public function collect(EncodeValueEvent $event)
    {
        $value = $event->getValue();

        if ($value instanceof Definition) {
            foreach ($value->getRequiredLibraries() as $library) {
                if (isset($this->libraries[$library])) {
                    continue;
                }

                if (isset($this->stylesheets[$library])) {
                    foreach ($this->stylesheets[$library] as $asset) {
                        $this->assets->addStylesheet($asset[0], $asset[1]);
                    }
                }

                if (isset($this->javascripts[$library])) {
                    foreach ($this->javascripts[$library] as $asset) {
                        $this->assets->addJavascript($asset[0], $asset[1]);
                    }
                }

                $this->libraries[$library] = true;
            }
        }
    }
public function collect(EncodeValueEvent $event)
    {
        $value = $event->getValue();

        if ($value instanceof Definition) {
            foreach ($value->getRequiredLibraries() as $library) {
                if (isset($this->libraries[$library])) {
                    continue;
                }

                if (isset($this->stylesheets[$library])) {
                    foreach ($this->stylesheets[$library] as $asset) {
                        $this->assets->addStylesheet($asset[0], $asset[1]);
                    }
                }

                if (isset($this->javascripts[$library])) {
                    foreach ($this->javascripts[$library] as $asset) {
                        $this->assets->addJavascript($asset[0], $asset[1]);
                    }
                }

                $this->libraries[$library] = true;
            }
        }
    }
public function collect ( EncodeValueEvent $ event ) { $ value = $ event -> getValue ( ) ; if ( $ value instanceof Definition ) { foreach ( $ value -> getRequiredLibraries ( ) as $ library ) { if ( isset ( $ this -> libraries [ $ library ] ) ) { continue ; } if ( isset ( $ this -> stylesheets [ $ library ] ) ) { foreach ( $ this -> stylesheets [ $ library ] as $ asset ) { $ this -> assets -> addStylesheet ( $ asset [ 0 ] , $ asset [ 1 ] ) ; } } if ( isset ( $ this -> javascripts [ $ library ] ) ) { foreach ( $ this -> javascripts [ $ library ] as $ asset ) { $ this -> assets -> addJavascript ( $ asset [ 0 ] , $ asset [ 1 ] ) ; } } $ this -> libraries [ $ library ] = true ; } } }
Collect all libraries.

@param EncodeValueEvent $event The subscribed event.

@return void
Collect all libraries .