Add an entry to the CacheMenuItems array

@param array $cacheActions Array of CacheMenuItems
@param array $optionValues Array of AccessConfigurations-identifiers (typically  used by userTS with
options.clearCache.identifier)
439665
public function manipulateCacheActions(&$cacheActions, &$optionValues)
    {
        $extensionConfiguration = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extParams']['tw_componentlibrary'];
        if ($GLOBALS['BE_USER']->isAdmin() && !empty($extensionConfiguration['componentlibrary'])) {
            $componentLibrary = $extensionConfiguration['componentlibrary'];
            $cacheActions[]   = array(
                'id'             => $componentLibrary,
                'title'          => 'LLL:EXT:tw_componentlibrary/Resources/Private/Language/locallang_core.xlf:cache.'.$componentLibrary.'.title',
                'description'    => 'LLL:EXT:tw_componentlibrary/Resources/Private/Language/locallang_core.xlf:cache.'.$componentLibrary.'.description',
                'href'           => '/typo3/index.php?route=%2F'.$componentLibrary,
                'iconIdentifier' => 'tx_twcomponentlibrary_cache'
            );
        }
    }
393183
public static function fromAssocArray(array $keyValueOptions, string $valueType = 'string') : ArrayFieldOptions
    {
        $options = [];

        foreach ($keyValueOptions as $value => $label) {
            settype($value, $valueType);
            $options[] = $label instanceof IFieldOption
                    ? $label
                    : new FieldOption($value, $label);
        }

        return new self($options);
    }
183000
public function addValues(array $fieldValues)
    {
        foreach ($fieldValues as $fieldName => $values) {
            $values = Arr::cast($values);
            if (null === ($field = $this->getField($fieldName))) {
                $message = "unknown field";
                $len = count($values);
                if ($len !== 1) {
                    $message .= " (encountered $len values)";
                }
                $error = new Error($message);
                $error->setName($fieldName);
                $this->addError($error);
            }
            else {
                foreach ($values as $index => $value) {
                    $field->addValue($value, $index);
                }   
            }
        }
    }
1006864
@Override
	public void cacheResult(List<CPOption> cpOptions) {
		for (CPOption cpOption : cpOptions) {
			if (entityCache.getResult(CPOptionModelImpl.ENTITY_CACHE_ENABLED,
						CPOptionImpl.class, cpOption.getPrimaryKey()) == null) {
				cacheResult(cpOption);
			}
			else {
				cpOption.resetOriginalValues();
			}
		}
	}
265982
public function setDirectives($directives)
    {
        if (!is_array($directives)) Zend_Cache::throwException('Directives parameter must be an array');
        while (list($name, $value) = each($directives)) {
            if (!is_string($name)) {
                Zend_Cache::throwException("Incorrect option name : $name");
            }
            $name = strtolower($name);
            if (array_key_exists($name, $this->_directives)) {
                $this->_directives[$name] = $value;
            }

        }

        $this->_loggerSanity();
    }
741604
public function addMenuItem($options)
    {
        foreach (['alias', 'name', 'priority'] as $attr) {
            if (!isset($options[$attr]) || (isset($options[$attr]) && $options[$attr] === '')) {
                throw new Exception('$options[\'' . $attr . '\'] is missing.');
            }
        }

        $menuItem = [
            'alias' => $options['alias'],
            'name' => $options['name'],
            'priority' => $options['priority'],
            'matchAction' => $options['matchAction'] ?? false,
            'doNotMatchAction' => [],
            'linkOptions' => $options['linkOptions'] ?? []
        ];

        if (isset($options['name_short'])) {
            $menuItem['name_short'] = $options['name_short'];
        }

        if (isset($options['icon'])) {
            $menuItem['icon'] = $options['icon'];
        }

        if (isset($options['url']) && is_array($options['url']) && !empty($options['url'])) {
            $url = $options['url'];
            if (!isset($url['plugin']) || (isset($url['plugin']) && $url['plugin'] === '')) {
                $url['plugin'] = null;
            }
            if (!isset($url['controller'])) {
                throw new Exception('$options[\'url\'][\'controller\'] is missing.');
            }
            if (!isset($url['action'])) {
                throw new Exception('$options[\'url\'][\'action\'] is missing.');
            }
            $menuItem['url'] = $url;
        }

        if (isset($options['doNotMatchAction'])) {
            $menuItem['doNotMatchAction'] = is_array($options['doNotMatchAction']) ? $options['doNotMatchAction'] : [$options['doNotMatchAction']];
        }

        if (isset($options['parent'])) {
            if (!isset($this->_menuItems[$options['parent']])) {
                throw new Exception('No menu item with the alias specified in $options[\'parent\'] "' . $options['parent'] . '"exists.');
            }
            $menuItem['parent'] = $options['parent'];
            $this->_menuItems[$menuItem['parent']]['children'][$menuItem['alias']] = $menuItem;
        } else {
            $this->_menuItems[$menuItem['alias']] = $menuItem;
        }

        return $this;
    }
540875
public static function setPatternOption($patternStoreKey,$optionName,$optionValue) {

		if (isset(self::$store[$patternStoreKey])) {

			self::$store[$patternStoreKey][$optionName] = $optionValue;
			return true;

		}

		return false;

	}
993981
protected function getSelectedChoices($choiceViews, array $values)
    {
        $selectedChoices = [];

        foreach ($choiceViews as $index => $choiceView) {
            if ($choiceView instanceof ChoiceGroupView) {
                $selectedChoices = array_merge($selectedChoices, $this->getSelectedChoices($choiceView->choices, $values));
            } elseif ($choiceView instanceof ChoiceView) {
                if (\in_array($choiceView->value, $values)) {
                    $selectedChoices[] = $choiceView;
                }
            }
        }

        return $selectedChoices;
    }
823437
public function setOptions($options, $ignoreUnknown = false, $arraysAsManyOfArgs = true) {
		if (! is_array($options) && ! $options instanceof Traversable) {
			throw new InvalidOption('Options must be represented as an array or a traversable implementation');
		}

		foreach ($options as $option => $value) {
			if (strpos($option, '_') !== false) {
				$option = ucwords(str_replace('_', ' ', $option));
				$option = lcfirst(str_replace(' ', '', $option));
			}

			if ($option === 'options') {
				continue;
			}
			
			$method = 'set' . $option;
			
			if (! method_exists($this, $method)) {
				if (! $ignoreUnknown) {
					$this->onUnknownOptionSet($option, $value);
				}
				
				continue;
			}

			if ($value instanceof ConfigInterface) {
				$value = $value->toArray();
			}

			if ($arraysAsManyOfArgs && is_array($value)) {
				call_user_func_array([$this, $method], $value);
			} else {
				$this->$method($value);
			}
		}

		return $this;
	}
1151094
public function setOptions(array $options)
    {
        if (isset($options['exchange'])) {
            $this->exchange = $options['exchange'];
        }
        if (isset($options['exchange'])) {
            if (!is_string($options['exchange'])) {
                throw new \UnexpectedValueException('exchange value is not a string, a string is required');
            }
            $this->exchange = $options['exchange'];
            unset($options['exchange']);
        }
        if (isset($options['queue'])) {
            if (isset($options['queue']['arguments'])) {
                $this->queueOptions = $options['queue'];
            }
            unset($options['queue']);
        }
        /*
         * @deprecated use of $options['uri'] is deprecated in favor of $options['connection']
         * this block is meant to provide reverse comparability 
         */
        if (!isset($options['connection']) && isset($options['uri'])) {
            trigger_error(
                'the use of `uri` in config options is no longer support for Rhubarb version >= 3.1',
                E_USER_DEPRECATED
            );
            $options['connection'] = $options['uri'];
            unset($options['connection']);
        } elseif (isset($options['uri'])) {
            trigger_error('as of Rhubarb version >= 3.1 `uri` config options is unsupported, you must not implement ' .
                '`connection` and `uri` together', E_NOTICE);
            unset($options['connection']);
        }
        if (isset($options['connection'])) {
            $uri = parse_url($options['connection']);
            if (!isset($uri['port'])) {
                $uri['scheme'] == 'amqps' ? 5673 : $this->options['connection']['port'];
            } else {
                $port = isset($uri['port']) ? $uri['port'] : $this->options['connection']['port'];
            }
            unset($options['connection']);
            $options['connection']['host'] = $uri['host'];
            $options['connection']['port'] = $port;
            $options['connection']['vhost'] = isset($uri['path']) ? $uri['path'] : $this->options['connection']['path'];
            /* I don't like it but to ensure that all parties are happy this is necasary */
            $options['connection']['vhost'] = preg_replace('#^/#', null, $options['connection']['vhost']);
            $options['connection']['login'] = isset($uri['username']) ? $uri['username'] : $this->options['connection']['login'];
            $options['connection']['password'] = isset($uri['pass']) ? $uri['pass'] : $this->options['connection']['password'];
            $this->options['connection'] = $options['connection'];
        }
        return $this;
    }
1345832
public function setTypeConverterOption($typeConverter, $optionKey, $optionValue)
    {
        foreach ($this->getTypeConvertersWithParentClasses($typeConverter) as $typeConverter) {
            $this->configuration[$typeConverter][$optionKey] = $optionValue;
        }
        return $this;
    }
952144
public function postProcessFormValues(array $formValues)
    {
        if (empty($formValues['defaultDeploymentPath']) === false) {
            $this->distributionSettings = Arrays::setValueByPath(
                $this->distributionSettings,
                'Lightwerk.SurfCaptain.frontendSettings.defaultDeploymentPath',
                $formValues['defaultDeploymentPath']
            );
        }
        if (empty($formValues['defaultUser']) === false) {
            $this->distributionSettings = Arrays::setValueByPath(
                $this->distributionSettings,
                'Lightwerk.SurfCaptain.frontendSettings.defaultUser',
                $formValues['defaultUser']
            );
        }
        $this->configurationSource->save(
            FLOW_PATH_CONFIGURATION . ConfigurationManager::CONFIGURATION_TYPE_SETTINGS,
            $this->distributionSettings
        );
    }
575280
public function setOptions($options)
    {
        $this->options = [
            'config_dir' => null,
            'cache_dir' => null,
            'debug' => false,
            'cache_class' => 'WebspaceCollectionCache',
            'base_class' => 'WebspaceCollection',
        ];

        // overwrite the default values with the given options
        $this->options = array_merge($this->options, $options);
    }
1201266
public function addOption($option, $optionValue)
    {
        if (!in_array($option, $this->possibleOptions)) {
            return;
        }

        $this->constraints[$option] = $optionValue;
    }
19135
public static function setOptionLink($optionName,$optionValue) {

		if (!isset(self::$store["link"])) {
			self::$store["link"] = array();
		}

		self::$store["link"][$optionName] = $optionValue;

	}
73813
protected function _prepareOperations($doValues = false)
    {

        $faceLoader = $this->getFace()->getFaceLoader();
        $face = $this->face;
        $faceList = $this->preparedOperation->getPreparedFaces();

        foreach ($face->getElements() as $element) {
            $pathToElement = $this->path . "." . $element->getName();
            if ($element->isEntity()) {
                // if element is joined we know what to do
                if (isset($faceList[$pathToElement])) {

                    $queryFace = $faceList[$pathToElement]->getQueryFace();

                    $operation = new Operation(self::OPERATION_EXISTING_ENTITY);
                    $operation->setOptions("element",$element);
                    $softPFace = new SoftPreparedFace($queryFace, $this->preparedOperation);
                    $softPFace->_build();
                    $operation->setOptions("relatedPreparedFace", $softPFace );

                    $this->operationsList[$pathToElement]=$operation;




                } else {
                    /*
                     * A . Look if the child was join by the parent
                     *
                     *      YES => EASY ! work's done... go to the next
                     *
                     *      NO  => Then it can only work with the parent
                     *
                     *              matching case : if current element is this.lemon.tree (where this is the tree) then it works because it refers to this
                     *              no matching case : if current element is this.lemon.seed (where this is the tree) seed doesnt refers to this (tree)
                     *
                     *
                     *          B . $basePath is made of at least 3 element (because we want to check for the parent of the parent
                     *
                     *          C . Take the parent and look if it is the same class as the child
                     *              e.g :
                     *                  assuming that "this" is a Lemon.
                     *                  Assuming we have the following paths : 1 this.tree.lemons  and 2 this.tree.leafs
                     *                      then in 1 "lemons" and "this" are both Lemon
                     *                      then in 2 "leafs" is Leaf but "this" is Lemon => ignore it
                     *
                     *          D . If same class, we have to make sure that it is the same element. Let's use "related" property for that
                     *
                     *              YES => Here is the match, fill it now
                     *
                     *              NO  => Not totaly lost, maybe that there is an implied relation
                     *
                     *                  E . Look for implied relation
                     *
                     */


                    // A was the previous step

                    $elementFace = $faceLoader->getFaceForClass($element->getClass());
                    $relatedBy = $element->getRelatedBy();
                    if($relatedBy){
                        $related = $elementFace->getDirectElement($relatedBy);
                    }else{
                        $related = null;
                    }

                    if ($related) {
                        // B
                        // this.tree => bad
                        // this.tree.lemon => good
                        if (substr_count($this->path, ".")<1) {
                            $this->operationsList[$pathToElement] = new Operation(self::OPERATION_PASS);

                        } else {
                            // find the related base path and take its face
                            $relatedBasePath = StringUtils::subStringBeforeLast($this->path, ".");
                            $parentQueryFace = $faceList[$relatedBasePath]->getQueryFace();

                            // C
                            // Same class ?
                            if ($parentQueryFace->getFace()->getClass() != $element->getClass()) {
                                $this->operationsList[$pathToElement] = new Operation(self::OPERATION_PASS);
                            } else {
                                /* @var $parentQueryFace QueryFace */
                                // D
                                // Look if parent and child refer to the same one
                                if ($parentQueryFace->getFace()->getDirectElement($element->getRelatedBy())->getRelatedBy() == $element->getName()) {
                                    $relatedBasePath=substr($this->path, 0, strrpos($this->path, '.'));

                                    // if $related is not in $facelist, then it means that $related is not a part of the query, ignore it..
                                    if (isset($faceList[$relatedBasePath.".".$related->getName()])) {
                                        $operation = new Operation(self::OPERATION_FORWARD_JOIN);
                                        $operation->setOptions("element",$element);

                                        $softPFace = new SoftPreparedFace($parentQueryFace, $this->preparedOperation);
                                        $softPFace->_build();
                                        $operation->setOptions("relatedPreparedFace", $softPFace );

                                        $this->operationsList[$pathToElement]=$operation;

                                    } else {
                                        //$this->operationsList[$pathToElement]=new Operation(self::OPERATION_PASS);
                                    }
                                } else {
                                    // TODO ?
                                    //$this->operationsList[$pathToElement]=new Operation(self::OPERATION_IMPLIED);
                                }

                            }


                        }


                    } else {
                        //$this->operationsList[$pathToElement] = new Operation(self::OPERATION_PASS);
                    }

                }

            } else {




                if(isset($this->columns[$pathToElement])){
                    $column = $this->columns[$pathToElement];
                    $operation = new Operation(self::OPERATION_DO_VALUES);
                    $operation->setOptions("columnName", $column->getAlias() );
                    $operation->setOptions("element", $column->getEntityFaceElement());
                    $this->operationsList[$element->getName()] = $operation;
                }


            }
        }
    }
741680
public static function Delete ($values, $options = []) {
		if (!static::InTransaction()) {
			throw CoreException::RaiseSystemError('トランザクションが展開されていません。');
		}
		$options += $options + static::GetDefaultOptions();
		return DBI::Delete(static::GetName(), $values, $options);
	}