src/Sulu/Component/Content/Document/Extension/ManagedExtensionContainer.php
public function offsetGet($extensionName)
    {
        if (isset($this->data[$extensionName])) {
            return $this->data[$extensionName];
        }

        $extension = $this->extensionManager->getExtension($this->structureType, $extensionName);

        // TODO: should not pass namespace here.
        //       and indeed this call should be removed and the extension should be
        //       passed the document.
        $extension->setLanguageCode($this->locale, $this->prefix, $this->internalPrefix);

        // passing the webspace and locale would also be unnecessary if we passed the
        // document
        $data = $extension->load($this->node, $this->webspaceName, $this->locale);

        $this->data[$extensionName] = $data;

        return $data;
    }
public function offsetGet($extensionName)
    {
        if (isset($this->data[$extensionName])) {
            return $this->data[$extensionName];
        }

        $extension = $this->extensionManager->getExtension($this->structureType, $extensionName);

        // TODO: should not pass namespace here.
        //       and indeed this call should be removed and the extension should be
        //       passed the document.
        $extension->setLanguageCode($this->locale, $this->prefix, $this->internalPrefix);

        // passing the webspace and locale would also be unnecessary if we passed the
        // document
        $data = $extension->load($this->node, $this->webspaceName, $this->locale);

        $this->data[$extensionName] = $data;

        return $data;
    }
public function offsetGet ( $ extensionName ) { if ( isset ( $ this -> data [ $ extensionName ] ) ) { return $ this -> data [ $ extensionName ] ; } $ extension = $ this -> extensionManager -> getExtension ( $ this -> structureType , $ extensionName ) ; // TODO: should not pass namespace here. //       and indeed this call should be removed and the extension should be //       passed the document. $ extension -> setLanguageCode ( $ this -> locale , $ this -> prefix , $ this -> internalPrefix ) ; // passing the webspace and locale would also be unnecessary if we passed the // document $ data = $ extension -> load ( $ this -> node , $ this -> webspaceName , $ this -> locale ) ; $ this -> data [ $ extensionName ] = $ data ; return $ data ; }
Lazily evaluate the value for the given extension.

@param string $extensionName

@return mixed
Lazily evaluate the value for the given extension .