protected function _construct() { parent::_construct(); $this->_fieldsCollection = Mage::getResourceModel('freshdesk/field_collection'); if ($this->_fieldsCollection->getSize() < 1) { throw new Mageplace_Freshdesk_Exception($this->_helper->__("Can't get ticket fields"), Mageplace_Freshdesk_Exception::ERROR_FIELDS); } $this->_fields = $this->_fieldsCollection->getItemsByNames(); }
public function setDataFromArray(array $data) { if (array_key_exists(self::PARAM_TICKET_ID, $data)) { $this->_ticketId = (int) $data[self::PARAM_TICKET_ID]; unset($data[self::PARAM_TICKET_ID]); } $data[self::PARAM_PRIVATE] = false; parent::setDataFromArray($data); return $this; }