Gc\Property\Collection::load PHP Method

load() public method

Load property
public load ( integer $documentTypeId = null, integer $tabId = null, integer $documentId = null ) : Collection
$documentTypeId integer Optional
$tabId integer Optional
$documentId integer Optional
return Collection
    public function load($documentTypeId = null, $tabId = null, $documentId = null)
    {
        $this->setDocumentTypeId($documentTypeId);
        $this->setTabId($tabId);
        $this->setDocumentId($documentId);
        $this->getProperties(true);
        return $this;
    }

Usage Example

Esempio n. 1
0
 /**
  * Test
  *
  * @return void
  */
 public function testGetProperties()
 {
     $documentModel = DocumentModel::fromArray(array('name' => 'DocumentTest', 'url_key' => 'document-test', 'status' => DocumentModel::STATUS_ENABLE, 'sort_order' => 1, 'show_in_nav' => true, 'user_id' => $this->user->getId(), 'document_type_id' => $this->documentType->getId(), 'view_id' => $this->view->getId(), 'layout_id' => $this->layout->getId(), 'parent_id' => 0));
     $documentModel->save();
     $this->object->setDocumentId($documentModel->getId());
     $this->object->save();
     $this->object->load($this->documentType->getId(), $this->tab->getId(), 1);
     $this->assertInternalType('array', $this->object->getProperties(true));
     $this->object->load();
     $this->assertInternalType('array', $this->object->getProperties(true));
 }
All Usage Examples Of Gc\Property\Collection::load