setPadding example

EOD;

    $data['two_column_border_collapse'][] = (new SvgIconBuilder())
      ->setWidth(250)
      ->setHeight(300)
      ->setStrokeWidth(2)
      ->setPadding(-2);
    $data['two_column_border_collapse'][] = [['left', 'right']];
    $data['two_column_border_collapse'][] = <<<'EOD' <svg width="250" height="300" class="layout-icon"><g><title>left</title> <rect x="1" y="1" width="124" height="298" stroke-width="2" class="layout-icon__region layout-icon__region--left" /> </g> <g><title>right</title> <rect x="125" y="1" width="124" height="298" stroke-width="2" class="layout-icon__region layout-icon__region--right" /> </g> </svg> EOD;

    
'#height' => $height,
        '#alt' => $this->getLabel(),
      ];
    }
    elseif ($icon_map = $this->getIconMap()) {
      $icon_builder = $this->getIconBuilder()
        ->setId($this->id())
        ->setLabel($this->getLabel())
        ->setWidth($width)
        ->setHeight($height);
      if ($padding) {
        $icon_builder->setPadding($padding);
      }
      if ($stroke_width) {
        $icon_builder->setStrokeWidth($stroke_width);
      }
      $icon = $icon_builder->build($icon_map);
    }
    return $icon;
  }

  /** * Wraps the icon builder. * * @return \Drupal\Core\Layout\Icon\IconBuilderInterface * The icon builder. */

    public function init()
    {
        $this->Front()->Plugins()->ScriptRenderer()->setRender();
        $this->Front()->Plugins()->JsonRequest()
            ->setParseInput()
            ->setParseParams(['group', 'sort', 'filter'])
            ->setPadding($this->Request()->get('targetField'));

        // Call controller acl rules (user - defined)         $this->initAcl();
    }

    /** * Enable json renderer for index / load action * Checks acl rules */
    public function preDispatch()
    {
        
Home | Imprint | This part of the site doesn't use cookies.