@param array $options

@return ItemInterface

@throws ApiExceptions\InvalidArgumentException
@throws ApiExceptions\BadStateException
@throws InvalidArgumentException
171548
public function createStructure(array $options): ItemInterface
    {
        /** @var ItemInterface|ItemInterface[] $menu */
        $menu = $this->factory->createItem('root');

        /** @var Location $location */
        $location = $options['location'];
        /** @var Content $content */
        $content = $options['content'];
        /** @var Language $language */
        $language = $options['language'];
        /** @var Location $parentLocation */
        $parentLocation = $options['parent_location'];

        $target = (new Target\Builder\VersionBuilder())->translateToAnyLanguageOf([$language->languageCode])->build();
        $canPublish = $this->permissionResolver->canUser('content', 'publish', $content, [$target]);
        $canEdit = $this->permissionResolver->canUser('content', 'edit', $content, [$target]);
        $canDelete = $this->permissionResolver->canUser('content', 'versionremove', $content);

        $publishAttributes = [
            'class' => self::BTN_TRIGGER_CLASS,
            'data-click' => '#ezrepoforms_content_edit_publish',
        ];
        $editAttributes = [
            'class' => self::BTN_TRIGGER_CLASS,
            'data-click' => '#ezrepoforms_content_edit_saveDraft',
        ];
        $deleteAttributes = [
            'class' => self::BTN_TRIGGER_CLASS,
            'data-click' => '#ezrepoforms_content_edit_cancel',
        ];

        $items = [
            self::ITEM__PUBLISH => $this->createMenuItem(
                self::ITEM__PUBLISH,
                [
                    'attributes' => $canEdit && $canPublish
                        ? $publishAttributes
                        : array_merge($publishAttributes, self::BTN_DISABLED_ATTR),
                    'extras' => [
                        'icon' => 'publish',
                        'orderNumber' => 10,
                    ],
                ]
            ),
            self::ITEM__SAVE_DRAFT => $this->createMenuItem(
                self::ITEM__SAVE_DRAFT,
                [
                    'attributes' => $canEdit
                        ? $editAttributes
                        : array_merge($editAttributes, self::BTN_DISABLED_ATTR),
                    'extras' => [
                        'icon' => 'save',
                        'orderNumber' => 50,
                    ],
                ]
            ),
        ];

        $items[self::ITEM__PREVIEW] = $this->getContentPreviewItem(
            $location,
            $content,
            $language,
            $parentLocation
        );

        $items[self::ITEM__CANCEL] = $this->createMenuItem(
            self::ITEM__CANCEL,
            [
                'attributes' => $canDelete
                    ? $deleteAttributes
                    : array_merge($deleteAttributes, self::BTN_DISABLED_ATTR),
                'extras' => [
                    'icon' => 'circle-close',
                    'orderNumber' => 70,
                ],
            ]
        );

        $menu->setChildren($items);

        return $menu;
    }
925188
public function setOptions(array $options)
    {
        foreach ($options as $opt => $val) {
            $this->setOption($opt, $val);
        }

        return $this;
    }
694779
public function options(array $options): self
    {
        foreach ($options as $key => $value) {
            $this->set('options.'.$key, $value);
        }

        return $this;
    }
960001
public function setOptions(array $options): FieldTypeInterface
    {
        $this->validateOptions($options);
        $this->options = $this->parseOptions(array_merge(
            $this->getDefaultOptions(),
            $this->options,
            $options
        ));

        return $this;
    }
1204534
public function getItemFormView(array $options = array())
    {
        $item = new CartItem();
        $form = $this->container->get('form.factory')->create('EcommerceBundle\Form\CartItemSimpleType', $item, $options);

        return $form->createView();
    }
123350
public function setOptions(array $options): Options
    {
        foreach ($options as $key => $option) {
            $this->options[$key] = $option;
        }

        return $this;
    }
945172
protected function createConfigureMenuEvent(ItemInterface $menu, array $options = []): ConfigureMenuEvent
    {
        return new ConfigureMenuEvent($this->factory, $menu, $options);
    }
1144897
public function createStructure(array $options): ItemInterface
    {
        $menu = $this->factory->createItem('root');

        $menu->setChildren([
            self::ITEM__ACCOUNT => $this->createMenuItem(
                self::ITEM__ACCOUNT,
                [
                    'route' => 'edgar.ezuiprofile.account',
                    'extras' => ['icon' => 'author'],
                ]
            ),
            self::ITEM__SECURITY => $this->createMenuItem(
                self::ITEM__SECURITY,
                [
                    'route' => 'edgar.ezuiprofile.security',
                    'extras' => ['icon' => 'lock'],
                ]
            ),
            self::ITEM__CONTENT => $this->createMenuItem(
                self::ITEM__CONTENT,
                [
                    'route' => 'edgar.ezuiprofile.content',
                    'extras' => ['icon' => 'personalize-content'],
                ]
            ),
        ]);

        return $menu;
    }
1195659
public function setOptions($options = [])
    {
        $this->options = $options;
        $this->debug->info(__FUNCTION__, 'setOptions: ', $this->options);

        return $this;
    }
1071404
public function options(array $options = null)
    {
        if (null === $options) {
            return $this->options;
        }

        $this->options = [];
        foreach($options as $option)
            $this->options[$option] = false;

        return $this;
    }
1273133
public function create(array $options = [])
    {
        $this->info = $this->connection->createTopic($options + [
            'name' => $this->name
        ]);

        return $this->info;
    }
727513
public function setOptions($options)
    {
        if (!is_int($options) && !is_null($options)) {
            throw new InvalidArgumentException('Invalid options.');
        }

        $this->options = $options ?: 0;

        $this->handleChangedParameters();

        return $this;
    }
490784
public function setOptions(array $options)
    {
        $this->validateOptions($options, $this->type);

        $this->options = $options;

        return $this;
    }
1000923
protected function createMenuItem(string $id, array $options): ?ItemInterface
    {
        return $this->factory->createItem($id, $options);
    }
799578
public static function createFromOptions(array $options)
    {
        Validate::notNull($options['Name'], 'options[Name]');

        $accessPolicy = new self($options['Name']);
        $accessPolicy->fromArray($options);

        return $accessPolicy;
    }
1175803
public function withOptions(int ...$options): OptionsInterface
    {
        foreach ($options as $option) {
            $this->options |= $option;
        }

        return $this;
    }
463874
public function options($options = [])
    {
        // remote options
        if (is_string($options)) {
            return $this->loadRemoteOptions(...func_get_args());
        }

        if ($options instanceof Arrayable) {
            $options = $options->toArray();
        }

        if (is_callable($options)) {
            $this->options = $options;
        } else {
            $this->options = (array) $options;
        }

        return $this;
    }