protected function addElementDependencies(ElementInterface $element, AttributeCollection $collection)
    {
        if ($element->hasOption('dependencies') && count($element->getOption('dependencies'))) {
            $dependencies = $this->formatter->formatDependencies($element->getOption('dependencies'));
            $collection->add(new Attribute('agDependencies', $dependencies, Attribute::TYPE_ARRAY));
        }
    }
protected function addElementDependencies(ElementInterface $element, AttributeCollection $collection)
    {
        if ($element->hasOption('dependencies') && count($element->getOption('dependencies'))) {
            $dependencies = $this->formatter->formatDependencies($element->getOption('dependencies'));
            $collection->add(new Attribute('agDependencies', $dependencies, Attribute::TYPE_ARRAY));
        }
    }
protected function addElementDependencies ( ElementInterface $ element , AttributeCollection $ collection ) { if ( $ element -> hasOption ( 'dependencies' ) && count ( $ element -> getOption ( 'dependencies' ) ) ) { $ dependencies = $ this -> formatter -> formatDependencies ( $ element -> getOption ( 'dependencies' ) ) ; $ collection -> add ( new Attribute ( 'agDependencies' , $ dependencies , Attribute :: TYPE_ARRAY ) ) ; } }
Adds javascript dependencies to element

@param ElementInterface    $element
@param AttributeCollection $collection
Adds javascript dependencies to element