コード例 #1
0
ファイル: Node.php プロジェクト: NuclearCMS/Hierarchy
 /**
  * Overloading default Translatable functionality for
  * creating a new translation
  *
  * @param string $locale
  * @return Model
  */
 public function getNewTranslation($locale)
 {
     $nodeSource = NodeSource::newWithType($locale, $this->getNodeTypeName());
     $this->translations->add($nodeSource);
     return $nodeSource;
 }
コード例 #2
0
 protected function getNodeSource($locale = 'en', $type = 'project')
 {
     return NodeSource::newWithType($locale, $type);
 }