Esempio n. 1
0
 public function actionWritePreviews()
 {
     $sizes = ['xs', 'sm', 'md', 'lg'];
     foreach ($sizes as $size) {
         $str = '';
         foreach ($this->getIconsList() as $name) {
             $str .= "![{$name}](https://raw.githubusercontent.com/hiqdev/payment-icons/master/src/assets/png/{$size}/{$name}.png)\n";
         }
         FileHelper::write('@hiqdev/paymenticons/../docs/Preview' . strtoupper($size) . '.md', $str);
         if ($size === 'xs') {
             $ps = [];
             foreach ($sizes as $s) {
                 $us = strtoupper($s);
                 $ps[] = "[{$us}](docs/Preview{$us}.md)";
             }
             $str .= "\n" . implode(' | ', $ps);
             FileHelper::write('@hiqdev/paymenticons/../docs/readme/Preview.md', $str);
         }
     }
 }
Esempio n. 2
0
 /**
  * Creates directory if not exists.
  * @param string $path
  * @return bool true if directory did not exist and was created
  */
 public function mkdir($path)
 {
     return FileHelper::mkdir($path);
 }