private function addElementByMenuCode(
        $element,
        $menuCode
    ) {
        if (!isset($this->elementsStoredByMenuCode[$menuCode])) {
            $this->elementsStoredByMenuCode[$menuCode] = [];
        }

        $elementId = spl_object_hash($element);
        $this->elementsStoredByMenuCode[$menuCode][$elementId] = $element;

        return $this;
    }
private function addElementByMenuCode(
        $element,
        $menuCode
    ) {
        if (!isset($this->elementsStoredByMenuCode[$menuCode])) {
            $this->elementsStoredByMenuCode[$menuCode] = [];
        }

        $elementId = spl_object_hash($element);
        $this->elementsStoredByMenuCode[$menuCode][$elementId] = $element;

        return $this;
    }
private function addElementByMenuCode ( $ element , $ menuCode ) { if ( ! isset ( $ this -> elementsStoredByMenuCode [ $ menuCode ] ) ) { $ this -> elementsStoredByMenuCode [ $ menuCode ] = [ ] ; } $ elementId = spl_object_hash ( $ element ) ; $ this -> elementsStoredByMenuCode [ $ menuCode ] [ $ elementId ] = $ element ; return $ this ; }
Add element by menu code.

@param mixed  $element  Element
@param string $menuCode Menu code

@return $this Self object
Add element by menu code .