public function addComponent($componentName): bool
    {
        if (is_array($componentName)) {
            foreach ($componentName as $cn) {
                $this->addComponent($cn);
            }

            return true;
        }
        $componentFile = 'app/components/' . Inflector::underscore($componentName) . '.js';

        if (file_exists(JS . DS . $componentFile)) {
            $this->_addDependency($componentFile);

            return true;
        }

        return false;
    }
public function addComponent($componentName): bool
    {
        if (is_array($componentName)) {
            foreach ($componentName as $cn) {
                $this->addComponent($cn);
            }

            return true;
        }
        $componentFile = 'app/components/' . Inflector::underscore($componentName) . '.js';

        if (file_exists(JS . DS . $componentFile)) {
            $this->_addDependency($componentFile);

            return true;
        }

        return false;
    }
public function addComponent ( $ componentName ) : bool { if ( is_array ( $ componentName ) ) { foreach ( $ componentName as $ cn ) { $ this -> addComponent ( $ cn ) ; } return true ; } $ componentFile = 'app/components/' . Inflector :: underscore ( $ componentName ) . '.js' ; if ( file_exists ( JS . DS . $ componentFile ) ) { $ this -> _addDependency ( $ componentFile ) ; return true ; } return false ; }
Include one or more JS components

@param string|array $componentName CamelCased component name    (e.g. SelectorAddressList)
@return bool
Include one or more JS components