getTabs() public méthode

Get Tabs
public getTabs ( ) : Collection
Résultat Gc\Tab\Collection
Exemple #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testGetTabs()
 {
     $this->assertInternalType('array', $this->object->getTabs());
 }
 /**
  * Prepare document type session
  *
  * @param Container          $session      Session container
  * @param DocumentType\Model $documentType DocumentType model
  *
  * @return array
  */
 protected function prepareDocumentTypeSession($session, $documentType)
 {
     $documentTypeSession = array('tabs' => array(), 'max-property-id' => 0, 'max-tab-id' => 0);
     foreach ($documentType->getTabs() as $tab) {
         $documentTypeSession['tabs'][$tab->getId()] = array('name' => $tab->getName(), 'description' => $tab->getDescription(), 'properties' => array());
         if ($tab->getId() > $documentTypeSession['max-tab-id']) {
             $documentTypeSession['max-tab-id'] = $tab->getId();
         }
         foreach ($tab->getProperties() as $property) {
             $documentTypeSession['tabs'][$tab->getId()]['properties'][$property->getId()] = array('name' => $property->getName(), 'identifier' => $property->getIdentifier(), 'tab' => $property->getTabId(), 'description' => $property->getDescription(), 'isRequired' => $property->isRequired(), 'datatype' => $property->getDatatypeId());
             if ($property->getId() > $documentTypeSession['max-property-id']) {
                 $documentTypeSession['max-property-id'] = $property->getId();
             }
         }
     }
     $session['document-type'] = $documentTypeSession;
 }