protected function handleBlockDefinitions(array $definitions)
    {
        $ids = [];
        foreach ($definitions as $blockDefinition) {
            $block = Yii::getAlias($blockDefinition, false);
            // if there is no alias, or not found, switch back to original name
            if ($block === false) {
                $block = $blockDefinition;
            }
            if (is_file($block)) {
                $ids[] = $this->saveBlockByPath($block);
            } elseif (is_dir($block)) {
                $ids = array_merge($ids, $this->saveBlocksFromFolder($block));
            } else {
                $this->addLog("Unable to process block definition '{$block}'");
            }
        }
        
        return $ids;
    }
protected function handleBlockDefinitions(array $definitions)
    {
        $ids = [];
        foreach ($definitions as $blockDefinition) {
            $block = Yii::getAlias($blockDefinition, false);
            // if there is no alias, or not found, switch back to original name
            if ($block === false) {
                $block = $blockDefinition;
            }
            if (is_file($block)) {
                $ids[] = $this->saveBlockByPath($block);
            } elseif (is_dir($block)) {
                $ids = array_merge($ids, $this->saveBlocksFromFolder($block));
            } else {
                $this->addLog("Unable to process block definition '{$block}'");
            }
        }
        
        return $ids;
    }
protected function handleBlockDefinitions ( array $ definitions ) { $ ids = [ ] ; foreach ( $ definitions as $ blockDefinition ) { $ block = Yii :: getAlias ( $ blockDefinition , false ) ; // if there is no alias, or not found, switch back to original name if ( $ block === false ) { $ block = $ blockDefinition ; } if ( is_file ( $ block ) ) { $ ids [ ] = $ this -> saveBlockByPath ( $ block ) ; } elseif ( is_dir ( $ block ) ) { $ ids = array_merge ( $ ids , $ this -> saveBlocksFromFolder ( $ block ) ) ; } else { $ this -> addLog ( "Unable to process block definition '{$block}'" ) ; } } return $ ids ; }
Handle an array with defintions whether they are files or folders.

@param array $definitions
@return array
@since 1.0.8
Handle an array with defintions whether they are files or folders .