init() public méthode

Initiliaze collection
public init ( integer $documentTypeId = null ) : void
$documentTypeId integer Optional document type id
Résultat void
Exemple #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testDeleteFailed()
 {
     $this->object->init(0);
     $this->assertFalse($this->object->delete());
 }
Exemple #2
0
 /**
  * Get available views
  *
  * @return \Gc\View\Collection
  */
 public function getAvailableViews()
 {
     if ($this->getData('available_views') === null) {
         $viewsCollection = new View\Collection();
         $viewsCollection->init($this->getId());
         $this->setData('available_views', $viewsCollection);
     }
     return $this->getData('available_views');
 }