src/Utility/Toolbar.php
public function loadItemType($type)
    {
        $signature = md5($type);
        if (isset($this->_buttons[$signature])) {
            return $this->_buttons[$signature];
        }

        list($plugin, $name) = pluginSplit($type);
        $alias = Slug::filter($name, '_');
        $aliasClass = Inflector::classify($alias);

        $className = $this->_getItemClassName($plugin, $aliasClass);

        if (!$className) {
            return false;
        }

        $this->_buttons[$signature] = new $className($this);
        return $this->_buttons[$signature];
    }
public function loadItemType($type)
    {
        $signature = md5($type);
        if (isset($this->_buttons[$signature])) {
            return $this->_buttons[$signature];
        }

        list($plugin, $name) = pluginSplit($type);
        $alias = Slug::filter($name, '_');
        $aliasClass = Inflector::classify($alias);

        $className = $this->_getItemClassName($plugin, $aliasClass);

        if (!$className) {
            return false;
        }

        $this->_buttons[$signature] = new $className($this);
        return $this->_buttons[$signature];
    }
public function loadItemType ( $ type ) { $ signature = md5 ( $ type ) ; if ( isset ( $ this -> _buttons [ $ signature ] ) ) { return $ this -> _buttons [ $ signature ] ; } list ( $ plugin , $ name ) = pluginSplit ( $ type ) ; $ alias = Slug :: filter ( $ name , '_' ) ; $ aliasClass = Inflector :: classify ( $ alias ) ; $ className = $ this -> _getItemClassName ( $ plugin , $ aliasClass ) ; if ( ! $ className ) { return false ; } $ this -> _buttons [ $ signature ] = new $ className ( $ this ) ; return $ this -> _buttons [ $ signature ] ; }
Load object of item type.

@param $type
@return ToolbarItem|bool
Load object of item type .