/** * Called by PluginController::reloadAction when the addon version does not match what's installed * * @param Plugin $plugin * @param MauticFactory $factory * @param null $metadata * @param Schema $installedSchema * * @throws \Exception */ public static function onPluginUpdate(Plugin $plugin, MauticFactory $factory, $metadata = null, Schema $installedSchema = null) { // BC support; @deprecated 1.1.4; to be removed in 2.0 if (method_exists(get_called_class(), 'onUpdate')) { // Create a bogus Addon $addon = new Addon(); $addon->setAuthor($plugin->getAuthor())->setBundle($plugin->getBundle())->setDescription($plugin->getDescription())->setId($plugin->getId())->setIntegrations($plugin->getIntegrations())->setIsMissing($plugin->getIsMissing())->setName($plugin->getName())->setVersion($plugin->getVersion()); static::onUpdate($addon, $factory); } // Not recommended although availalbe for simple schema changes - see updatePluginSchema docblock //self::updatePluginSchema($metadata, $installedSchema, $factory); }
/** * {@inheritDoc} */ public function getAuthor() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAuthor', array()); return parent::getAuthor(); }