function entries($config) { $CI =& get_instance(); $CI->load->library('content/entries_library'); $Entries_library = new Entries_library(); $Entries_library->initialize($config); return $Entries_library->entries(); }
function get_content_array() { if (isset($this->content_array) && is_array($this->content_array)) { return $this->content_array; } else { $this->content_array = array(); // Format object for build $Object = new stdClass(); $Object->id = $this->id; $Object->slug = $this->slug; $Object->title = $this->title; $Object->url_title = $this->url_title; $Object->required = $this->required; $Object->content_type_id = $this->content_type_id; $Object->status = $this->status; $Object->meta_title = $this->meta_title; $Object->meta_description = $this->meta_description; $Object->meta_keywords = $this->meta_keywords; $Object->created_date = $this->created_date; $Object->modified_date = $this->modified_date; $Object->author_id = $this->author_id; // Build content array $CI =& get_instance(); $CI->load->library('entries_library'); $Entries_library = new Entries_library(); $Entries_library->content_fields = $this->content_fields; $Entries_library->_content = $this->content_types->layout; foreach ($this->entry_data as $key => $value) { $Object->{$key} = $value; } $Object->dynamic_route = $this->content_types->dynamic_route; $Object->layout = $this->content_types->layout; $Object->short_name = $this->content_types->short_name; $Entries_library->build_entry_data($Object); $this->content_array = current($Entries_library->entries); return $this->content_array; } }