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?

1
  • 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) Commented Oct 1, 2014 at 14:51

1 Answer 1

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.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.