function getItemCount() { return DynamicListItem::objects()->filter(array('list_id' => $this->id))->count(); }
function getItems($limit = false, $offset = false) { if (!$this->_items) { $this->_items = DynamicListItem::objects()->filter(array('list_id' => $this->get('id'), 'status__hasbit' => DynamicListItem::ENABLED))->order_by($this->getListOrderBy()); if ($limit) { $this->_items->limit($limit); } if ($offset) { $this->_items->offset($offset); } } return $this->_items; }