Microweber\Providers\ContentManager::get_page PHP Method

get_page() public method

Get single content item by id from the content_table.
public get_page ( integer | string $id ) : array
$id integer | string The id of the page or the url of a page
return array The page row from the database
    public function get_page($id = 0)
    {
        if ($id == false or $id == 0) {
            return false;
        }
        if (intval($id) != 0) {
            $page = $this->get_by_id($id);
            if (empty($page)) {
                $page = $this->get_by_url($id);
            }
        } else {
            if (empty($page)) {
                $page = array();
                $page['layout_name'] = trim($id);
                $page = $this->get($page);
                $page = $page[0];
            }
        }
        return $page;
    }