Translations

J3.x:Creating a Plugin for Joomla/10/ru: Difference between revisions

From Joomla! Documentation

Created page with "* <code>$this->params</code>: the parameters set for this plugin by the administrator * <code>$this->_name</code>: имя плагина * <code>$th..."
 
No edit summary
Line 1: Line 1:
* <code>$this->params</code>: the [[S:MyLanguage/Parameter|parameters]] set for this plugin by the administrator
* <code>$this->params</code>: набор [[S:MyLanguage/Parameter|параметров]] для данного плагина, заданный администратором
* <code>$this->_name</code>: имя плагина
* <code>$this->_name</code>: имя плагина
* <code>$this->_type</code>: группа (тип) плагина
* <code>$this->_type</code>: группа (тип) плагина
* <code>$this->db</code>: объект базы данных (since {{JVer|3.1}})
* <code>$this->db</code>: объект базы данных (since {{JVer|3.1}})
* <code>$this->app</code>: объект приложения (since {{JVer|3.1}})
* <code>$this->app</code>: объект приложения (since {{JVer|3.1}})
'''Совет''' Для использования <code>$this->db</code> и <code>$this->app</code>, <code>JPlugin</code> проверяет, существуют ли свойства, и не закрытые ли они. Если предполагается использование объектов по умолчанию, создайте неинстанцированные свойства в классе плагина (к примеру <code>protected $db; protected $app;</code> в той же области, что и <code>protected $autoloadLanguage = true;</code>). Свойства не будут существовать до тех пор, пока не будут созданы явно.

Revision as of 12:54, 26 September 2017

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (J3.x:Creating a Plugin for Joomla)
* <code>$this->params</code>: the [[S:MyLanguage/Parameter|parameters]] set for this plugin by the administrator
* <code>$this->_name</code>: the name of the plugin
* <code>$this->_type</code>: the [[S:MyLanguage/Plugin/Events|group (type)]] of the plugin
* <code>$this->db</code>: the db object (since {{JVer|3.1}})
* <code>$this->app</code>: the application object (since {{JVer|3.1}})
'''Tip''' To use <code>$this->db</code> and <code>$this->app</code>, <code>JPlugin</code> tests if the property exists and is not private. If it is desired for the default objects to be used, create un-instantiated properties in the plugin class (i.e. <code>protected $db; protected $app;</code> in the same area as <code>protected $autoloadLanguage = true;</code>). The properties will not exist unless explicitly created.
  • $this->params: набор параметров для данного плагина, заданный администратором
  • $this->_name: имя плагина
  • $this->_type: группа (тип) плагина
  • $this->db: объект базы данных (since Joomla 3.1)
  • $this->app: объект приложения (since Joomla 3.1)

Совет Для использования $this->db и $this->app, JPlugin проверяет, существуют ли свойства, и не закрытые ли они. Если предполагается использование объектов по умолчанию, создайте неинстанцированные свойства в классе плагина (к примеру protected $db; protected $app; в той же области, что и protected $autoloadLanguage = true;). Свойства не будут существовать до тех пор, пока не будут созданы явно.