1

I've got file template.php, that is included in CBitrixComponentTemplate's method. CBitrixComponentTemplate has property $this->__component, that is dynamicly filled with object EtmOrderAdd. EtmOrderAdd has property objValidator.

Now, when I am writing the file template.php, I need all these properties to be understood by phpDoc. Here's the picture, illustrating my idea :

enter image description here

How should I write it?

potashin
  • 44,205
  • 11
  • 83
  • 107
may_cat
  • 11
  • 3
  • 1
    `@property` only works when used in PHPDoc for THAT class -- it will not work the way you are trying to use it. Since I'm not familiar with Bitrix at all, my only suggestion right now would be to introduce intermediate variable and use it instead (and for such case ordinary `@var` will work) – LazyOne Oct 01 '14 at 14:51

1 Answers1

3

Bitrix has almost no phpDoc for internal methods and functions. Also it has a plenty of legacy code, that won't show correctly with PhpStorm's code completion.

However, there are several things you can try to improve the situation:

  • Add bxApiDocs files as an External Library to PhpStorm.
    This will add autocomplete for the internal bitrix methods
  • It seems like you've defined custom component class since $template->__component usually contains CBitrixComponent object that doesn't have objValidator property. So you need to add @property inside your class.php file of your component.
nook_ru
  • 31
  • 3