Save menu configuration to memory.

@param string $menuCode Code of the menu

@return $this Self object
518227
public function removeFromCache($menuCode)
    {
        $key = $this->getCacheKey($menuCode);
        $this
            ->cache
            ->delete($key);

        return $this;
    }
891022
public function getConfigurationEntityFromCode($code)
    {
        $dbConfiguration = IndexEngineIndexQuery::create()->findOneByCode($code);

        if (null === $dbConfiguration) {
            throw new InvalidArgumentException(sprintf("The index configuration code '%s' doesn't exist", $code));
        }

        return $this->getConfigurationEntityFromPropelEntity($dbConfiguration);
    }
730218
public function withStatus($code = 200)
    {
        if (!array_key_exists($code, self::$responseCodes)) {
            throw new \Exception('That header code '.$code.' is not allowed.');
        }

        $this->code = $code;
        $this->reasonPhrase = self::$responseCodes[$code];

        return $this;
    }
198841
public function getElementsByMenuCodeAndStage(
        $menuCode,
        $stage
    ) {
        $elementsByMenuCode = isset($this->elementsStoredByMenuCode[$menuCode])
            ? $this->elementsStoredByMenuCode[$menuCode]
            : [];

        $elementsByStage = isset($this->elementsStoredByStage[$stage])
            ? $this->elementsStoredByStage[$stage]
            : [];

        $elements = array_values(
            array_intersect_key(
                array_merge(
                    $this->allElements,
                    $elementsByMenuCode
                ),
                $elementsByStage
            )
        );

        usort($elements, function ($element1, $element2) {
            $element1Id = spl_object_hash($element1);
            $element2Id = spl_object_hash($element2);

            return $this->priorities[$element1Id] <= $this->priorities[$element2Id];
        });

        return $elements;
    }
971372
public function save(){
        $this->_contentArray =  array_merge($this->_codesBeforeEditArea, $this->_editArea, $this->_codesAfterEditArea);
        return $this;
    }
247946
public function withStatus($code, $reasonPhrase = '') : self
    {
        $new = clone $this;

        return $new->setResponse(
            $this->response->withStatus($code, $reasonPhrase)
        );
    }
189878
private function setCountryCode(?string $countryCode): self
    {
        $this->updatePropertyValue(
            CountryCodeFieldInterface::PROP_COUNTRY_CODE,
            $countryCode
        );

        return $this;
    }
852671
protected function createSubmenuMenu($menu): self
    {
        if (is_callable($menu)) {
            $transformer = $menu;
            $menu = $this->blueprint();
            $transformer($menu);
        }

        return $menu;
    }
436429
function setCurrentLanguage( $languageCode )
    {
        $this->CurrentLanguage = $languageCode;
        if ( $this->hasContentObject() )
        {
            $this->ContentObject->setCurrentLanguage( $languageCode );
        }
        $this->Name = null;
    }
1101566
private function fixateCode(int $code): self
    {
        $this->setCode($code);
        $this->fixed = true;
        return $this;
    }
73390
public function setLanguage($code = null)
    {
        if (!isset($code)) {
            $code = $this->config->get('cli_langcode', '');
        }

        $this->langcode = $code;
        $this->translation->set($code, null);

        return $this;
    }
67013
public function withCode(int $code): PayloadInterface
    {
        if ($this->code === $code) {
            return $this;
        }

        $clone = clone $this;
        $clone->code = $code;

        return $clone;
    }
961373
public function setHttpCode($httpCode)
    {
        if (!array_key_exists($httpCode, $this->httpCodes)) {
            throw new \Parable\Http\Exception("Invalid HTTP code set: '{$httpCode}'");
        }
        $this->httpCode = $httpCode;
        return $this;
    }
1246697
public function setCode($code) {
        $this->code = trim($code);
        $this->codeLength = strlen($this->code);
        return $this;
    }
1113858
public static function get_menu_item($code)
    {
        $menuItems = self::get_menu_items();
        return (isset($menuItems[$code])) ? $menuItems[$code] : false;
    }
296238
function createCode()
  {
    $this->code = false;

    if ($this->use_wordlist && is_readable($this->wordlist_file)) {
      $this->code = $this->readCodeFromFile();
    }

    if ($this->code == false) {
      $this->code = $this->generateCode($this->code_length);
    }

    $this->saveData();
  }
1338320
public function setWarehouseCode( $code )
	{
		$this->_checkCode( $code );

		if ( $code == $this->getWarehouseCode() ) { return; }

		$this->_values['warehousecode'] = (string) $code;
		$this->setModified();
	}