getIconPath example

$localPlugin->setRedirectToStore($storePlugin->isRedirectToStore());
        $localPlugin->setLowestPrice($storePlugin->getLowestPrice());
        $localPlugin->setContactForm($storePlugin->getContactForm());
        $localPlugin->setRating($storePlugin->getRating());
        $localPlugin->setUseContactForm($storePlugin->useContactForm());
        $localPlugin->setInstallationManual($storePlugin->getInstallationManual());
        $localPlugin->setChangelog($storePlugin->getChangelog());
        $localPlugin->setPrices($storePlugin->getPrices());
        $localPlugin->setComments($storePlugin->getComments());
        $localPlugin->setPictures($storePlugin->getPictures());
        $localPlugin->setProducer($storePlugin->getProducer());
        $localPlugin->setIconPath($storePlugin->getIconPath());
        $localPlugin->setAddons($storePlugin->getAddons());
        $localPlugin->setEncrypted($storePlugin->isEncrypted());
        $localPlugin->setCertified($storePlugin->isCertified());
        $localPlugin->setLicenceCheck($storePlugin->hasLicenceCheck());
        if (!$localPlugin->hasCapabilityDummy()) {
            $localPlugin->setCapabilityDummy($storePlugin->hasCapabilityDummy());
        }
    }

    public function assignLocalPluginStruct(PluginStruct $storePlugin, PluginStruct $localPlugin)
    {
        

  public function getIcon($width = 125, $height = 150, $stroke_width = NULL, $padding = NULL) {
    $icon = [];
    if ($icon_path = $this->getIconPath()) {
      $icon = [
        '#theme' => 'image',
        '#uri' => $icon_path,
        '#width' => $width,
        '#height' => $height,
        '#alt' => $this->getLabel(),
      ];
    }
    elseif ($icon_map = $this->getIconMap()) {
      $icon_builder = $this->getIconBuilder()
        ->setId($this->id())
        
$base_path = $this->themeHandler->getTheme($provider)->getPath();
    }
    else {
      $base_path = '';
    }

    $path = $definition->getPath();
    $path = !empty($path) ? $base_path . '/' . $path : $base_path;
    $definition->setPath($path);

    // Add the base path to the icon path.     if ($icon_path = $definition->getIconPath()) {
      $definition->setIconPath($path . '/' . $icon_path);
    }

    // Add a dependency on the provider of the library.     if ($library = $definition->getLibrary()) {
      $config_dependencies = $definition->getConfigDependencies();
      [$library_provider] = explode('/', $library, 2);
      if ($this->moduleHandler->moduleExists($library_provider)) {
        $config_dependencies['module'][] = $library_provider;
      }
      elseif ($this->themeHandler->themeExists($library_provider)) {
        
Home | Imprint | This part of the site doesn't use cookies.