コード例 #1
0
ファイル: Blueprints.php プロジェクト: dweelie/grav
 /**
  * Load blueprint file.
  *
  * @param  string  $name  Name of the blueprint.
  * @return Blueprint
  */
 protected function loadFile($name)
 {
     $blueprint = new Blueprint($name);
     if (is_array($this->search) || is_object($this->search)) {
         // Page types.
         $blueprint->setOverrides($this->search);
         $blueprint->setContext('blueprints://pages');
     } else {
         $blueprint->setContext($this->search);
     }
     return $blueprint->load()->init();
 }
コード例 #2
0
ファイル: CompiledBlueprints.php プロジェクト: dweelie/grav
 /**
  * Load single configuration file and append it to the correct position.
  *
  * @param  string  $name  Name of the position.
  * @param  array   $files  Files to be loaded.
  */
 protected function loadFile($name, $files)
 {
     // Load blueprint file.
     $blueprint = new Blueprint($files);
     $this->object->embed($name, $blueprint->load()->toArray(), '/', true);
 }