/** {@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; }
public function prepare() { $this->option = $this->modx->getObject('msOption', $this->getProperty('option', 0)); $this->optionCategories = $this->option ? $this->option->getMany('OptionCategories') : array(); parent::prepare(); }