Ejemplo n.º 1
0
 /** {@inheritDoc} */
 public function initialize()
 {
     $initialize = parent::initialize();
     $this->pid = $this->getProperty('currentResource');
     if ($res = $this->modx->getObject('msProduct', $this->pid)) {
         $this->parent_id = $res->get('parent');
     }
     return $initialize;
 }
Ejemplo n.º 2
0
 public function prepare()
 {
     $this->option = $this->modx->getObject('msOption', $this->getProperty('option', 0));
     $this->optionCategories = $this->option ? $this->option->getMany('OptionCategories') : array();
     parent::prepare();
 }