function makeupBlocks()
 {
     $blocks_path = HelperFile::normalizeFilePath(Manager::getPath('blocks'));
     if (file_exists($blocks_path)) {
         foreach (\File::directories($blocks_path) as $path) {
             $path = HelperFile::normalizeFilePath($path);
             Manager::block(trim(str_replace($blocks_path, '', $path), '/'));
         }
     }
 }
Beispiel #2
0
 function css()
 {
     $ret = [];
     $prefix = 'blocks/' . $this->name . '/';
     $suffix_breakpoints = Manager::getUrl($prefix);
     $dir_breakpoints = Manager::getPath($prefix);
     if (file_exists($dir_breakpoints)) {
         foreach (\File::allFiles($dir_breakpoints) as $css) {
             $fn = $css->getFilename();
             $size = (int) $fn;
             if ($size) {
                 $this->breakpoint($size);
                 $ret[$size] = $suffix_breakpoints . $fn;
             }
         }
     }
     ksort($ret);
     if (file_exists(Manager::getPath($prefix . 'block.css'))) {
         $ret[] = Manager::getUrl($prefix . 'block.css');
     }
     krsort($ret);
     return $ret;
 }