Пример #1
0
 /**
  * Constructor, initialize documents
  *
  * @param integer $documentId   Document id
  * @param boolean $activeBranch Use active branch or not
  */
 public function __construct($documentId = 0, $activeBranch = false)
 {
     $documents = new Document\Collection();
     $documents->load($documentId);
     $this->documents = $documents->getDocuments();
     $this->requestUri = Registry::get('Application')->getRequest()->getUri()->getPath();
     $this->useActiveBranch = (bool) $activeBranch;
 }
Пример #2
0
 /**
  * Test
  *
  * @return void
  */
 public function testLoadWithParentId()
 {
     $this->object->load($this->document->getId());
     $this->assertInternalType('array', $this->object->getDocuments());
 }