Beispiel #1
0
 /**
  * Get icon for Integration
  *
  * @return string
  */
 public function getIcon()
 {
     $systemPath = $this->factory->getSystemPath('root');
     $bundlePath = $this->factory->getSystemPath('bundles');
     $pluginPath = $this->factory->getSystemPath('plugins');
     $genericIcon = $bundlePath . '/PluginBundle/Assets/img/generic.png';
     $name = $this->getName();
     $bundle = $this->settings->getPlugin()->getBundle();
     $icon = $pluginPath . '/' . $bundle . '/Assets/img/' . strtolower($name) . '.png';
     if (file_exists($systemPath . '/' . $icon)) {
         return $icon;
     }
     return $genericIcon;
 }
 /**
  * {@inheritDoc}
  */
 public function getPlugin()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPlugin', array());
     return parent::getPlugin();
 }