_init('revslider/css', 'id'); } public function loadByRule(AM_RevSlider_Model_Css $css, $rule){ if (!$rule) return $css; $adapter = $this->_getReadAdapter(); $bind = array('handle' => $rule); $select = $adapter->select() ->from($this->getMainTable(), array($this->getIdFieldName())) ->where('handle = :handle'); $cssId = $adapter->fetchOne($select, $bind); if ($cssId){ $css->load($cssId); }else{ $css->setData(array()); } return $css; } }