getMenuItems example


    public function createMenuItem(array $options)
    {
        if (!isset($options['label'])) {
            return null;
        }

        $item = new Menu();
        $item->fromArray($options);
        $plugin = $this->Plugin();
        $plugin->getMenuItems()->add($item);
        $item->setPlugin($plugin);

        return $item;
    }

    /** * @return ModelRepository<Payment> */
    final public function Payments(): ModelRepository
    {
        return Shopware()->Models()->getRepository(Payment::class);
    }
Home | Imprint | This part of the site doesn't use cookies.