/**
  * Build navigation item
  *
  * @param $params
  * @return object|null
  */
 public function buildItem($params)
 {
     $navigationItem = new NavigationItem($params);
     $navigationItem->setType($this->getType());
     $pinbarTabItem = new PinbarTab();
     $pinbarTabItem->setItem($navigationItem);
     $pinbarTabItem->setMaximized(!empty($params['maximized']));
     return $pinbarTabItem;
 }
 public function testNavigationItemEntity()
 {
     $user = new User();
     $user->setEmail('*****@*****.**');
     $values = ['title' => 'Some Title', 'url' => 'Some Url', 'position' => 'Some position', 'user' => $user];
     $item = new NavigationItem($values);
     $item->setType('test');
     $this->assertEquals($values['title'], $item->getTitle());
     $this->assertEquals($values['url'], $item->getUrl());
     $this->assertEquals($values['position'], $item->getPosition());
     $this->assertEquals($values['user'], $item->getUser());
     $this->assertEquals('test', $item->getType());
     $dateTime = new \DateTime();
     $item->setUpdatedAt($dateTime);
     $this->assertEquals($dateTime, $item->getUpdatedAt());
     $dateTime = new \DateTime();
     $item->setCreatedAt($dateTime);
     $this->assertEquals($dateTime, $item->getCreatedAt());
 }
 /**
  * Build navigation item
  *
  * @param $params
  * @return NavigationItem|null
  */
 public function buildItem($params)
 {
     $navigationItem = new NavigationItem($params);
     $navigationItem->setType($this->getType());
     return $navigationItem;
 }
 /**
  * {@inheritDoc}
  */
 public function setType($type)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setType', array($type));
     return parent::setType($type);
 }