getTabs() public method

Return all tabs from collection
public getTabs ( boolean $forceReload = false ) : array
$forceReload boolean Force reload collection
return array
Example #1
0
 /**
  * Get Tabs
  *
  * @return \Gc\Tab\Collection
  */
 public function getTabs()
 {
     if ($this->getData('tabs') === null) {
         $tabsCollection = new Tab\Collection();
         $tabsCollection->load($this->getId());
         $this->setData('tabs', $tabsCollection->getTabs());
     }
     return $this->getData('tabs');
 }
Example #2
0
 /**
  * Test
  *
  * @return void
  */
 public function testGetTabs()
 {
     $this->assertInternalType('array', $this->object->getTabs());
 }
Example #3
0
 /**
  * Initialize tabs sub form
  *
  * @return \Zend\Form\FieldSet
  */
 protected function getTabs()
 {
     $fieldsets = $this->getFieldSets();
     if (!empty($fieldsets['tabs'])) {
         return $fieldsets['tabs'];
     }
     $fieldsets = new FieldSet('tabs');
     $tabsList = new Element\Select('tabs_list');
     $tabCollection = new Tab\Collection();
     $tabsList->setValueOptions($tabCollection->getTabs());
     $fieldsets->add($tabsList);
     $this->add($fieldsets);
     $this->getInputFilter()->add(array('type' => 'Zend\\InputFilter\\InputFilter'), 'tabs');
     return $fieldsets;
 }