예제 #1
0
 /**
  * Makes a node type mutation
  *
  * @param mixed $value
  * @return Media
  */
 protected function makeNodeTypeMutation($value)
 {
     return node_bag($value);
 }
예제 #2
0
 /**
  * Gets the full url for node
  *
  * @param string $locale
  * @return string
  */
 public function getSiteURL($locale = null)
 {
     $node = $this;
     $uri = '';
     do {
         $uri = '/' . $node->getTranslationAttribute('node_name', $locale) . $uri;
         $node = is_null($node->parent_id) ? null : node_bag($node->parent_id, false);
     } while (!is_null($node) && $node->home != '1');
     return url($uri);
 }
예제 #3
0
 /** @test */
 function it_registers_nodebag_helper()
 {
     $this->assertInstanceOf('Nuclear\\Hierarchy\\NodeBag', node_bag());
     $this->assertNull(node_bag(1337));
 }