Example #1
0
 public function getTemplateContents()
 {
     if (parent::getTemplateContents()) {
         $this->templateContents = json_decode($this->templateContents, true);
         $this->contents = $this->templateContents;
         return $this->templateContents;
     } else {
         return false;
     }
 }
Example #2
0
 private function _loadFileModels()
 {
     if (!empty($this->filePaths)) {
         foreach ($this->filePaths as $filePath) {
             $file = File::loadPath($filePath);
             if ($file) {
                 if ($this->fileTypes !== null) {
                     if (in_array($file->getType(), $this->fileTypes)) {
                         $this->files[] = $file;
                     }
                 } else {
                     $this->files[] = $file;
                 }
             }
         }
     }
 }
Example #3
0
 public function rules()
 {
     return array_merge([[['tree', 'parser', 'treeNew'], 'safe']], parent::rules());
 }
Example #4
0
 public function rules()
 {
     return array_merge([[['data'], 'safe']], parent::rules());
 }