PHP Class Microweber\Providers\ContentManager

Afficher le fichier Open project: microweber/microweber

Méthodes publiques

Свойство Type Description
$app Microweber\Application
$no_cache Boolean that indicates the usage of cache while making queries.
$precached_links
$skip_pages_starting_with_url
$table_prefix
$tables

Méthodes publiques

Méthode Description
__construct ( $app = null )
attributes ( $content_id )
breadcrumb ( $params = false )
custom_fields ( $content_id, $full = true, $field_type = false )
data ( $content_id )
define_constants ( array | boolean $content = false ) Defines all constants that are needed to parse the page layout.
edit_field ( $data, $debug = false )
get ( mixed | array | boolean | string $params = false ) : array | boolean | mixed Get array of content items from the database.
get_by_id ( integer $id ) : array Get single content item by id from the content_table.
get_by_url ( $url = '', $no_recursive = false )
get_children ( $id, $without_main_parrent = false )
get_data ( $params = false )
get_inherited_parent ( $content_id ) Get the first parent that has layout.
get_page ( integer | string $id ) : array Get single content item by id from the content_table.
get_pages ( $params = false )
get_parents ( $id, $without_main_parrent = false )
get_posts ( $params = false )
get_products ( $params = false )
homepage ( ) Returns the homepage as array.
lang_current ( ) Get the current language of the site.
lang_set ( $lang = 'en' ) Set the current language.
link ( integer $id ) : string Gets a link for given content id.
next_content ( $content_id = false, $mode = 'next', $content_type = false )
pages_tree ( integer $parent, boolean $link = false, boolean $active_ids = false, boolean $active_code = false, boolean $remove_ids = false, boolean $removed_ids_code = false, boolean $ul_class_name = false, boolean $include_first = false ) : sting Print nested tree of pages.
paging ( $params ) : string paging.
paging_links ( $base_url = false, $pages_count, $paging_param = 'curent_page', $keyword_param = 'keyword' )
ping ( )
prev_content ( $content_id = false )
reorder ( $params )
save ( $data, $delete_the_cache = true )
save_content ( $data, $delete_the_cache = true )
save_content_admin ( $data, $delete_the_cache = true ) ------------------------------------------------------------------------
save_content_data_field ( $data, $delete_the_cache = true )
save_content_field ( $data, $delete_the_cache = true )
save_edit ( $post_data )
set_published ( string | array | boolean $params ) : string Set content to be published.
set_table_names ( array | boolean $tables = false ) Sets the database table names to use by the class.
set_unpublished ( string | array | boolean $params ) : string Set content to be unpublished.
site_templates ( )
title ( $id )

Method Details

__construct() public méthode

public __construct ( $app = null )

attributes() public méthode

public attributes ( $content_id )

breadcrumb() public méthode

public breadcrumb ( $params = false )

custom_fields() public méthode

public custom_fields ( $content_id, $full = true, $field_type = false )

data() public méthode

public data ( $content_id )

define_constants() public méthode

It accepts array or $content that must have $content['id'] set
public define_constants ( array | boolean $content = false )
$content array | boolean

edit_field() public méthode

public edit_field ( $data, $debug = false )

get() public méthode

It accepts string or array as parameters. You can pass any db field name as parameter to filter content by it. All parameter are passed to the get() function You can get and filter content and also order the results by criteria
public get ( mixed | array | boolean | string $params = false ) : array | boolean | mixed
$params mixed | array | boolean | string You can pass parameters as string or as array
Résultat array | boolean | mixed Array of content or false if nothing is found

get_by_id() public méthode

Get single content item by id from the content_table.
public get_by_id ( integer $id ) : array
$id integer The id of the content item
Résultat array

get_by_url() public méthode

public get_by_url ( $url = '', $no_recursive = false )

get_children() public méthode

public get_children ( $id, $without_main_parrent = false )

get_data() public méthode

public get_data ( $params = false )

get_inherited_parent() public méthode

Get the first parent that has layout.
public get_inherited_parent ( $content_id )

get_page() public méthode

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
Résultat array The page row from the database

get_pages() public méthode

public get_pages ( $params = false )

get_parents() public méthode

public get_parents ( $id, $without_main_parrent = false )

get_posts() public méthode

public get_posts ( $params = false )

get_products() public méthode

public get_products ( $params = false )

homepage() public méthode

Returns the homepage as array.
public homepage ( )

lang_current() public méthode

Get the current language of the site.
public lang_current ( )

lang_set() public méthode

Set the current language.
public lang_set ( $lang = 'en' )

next_content() public méthode

public next_content ( $content_id = false, $mode = 'next', $content_type = false )

pages_tree() public méthode

Print nested tree of pages.
public pages_tree ( integer $parent, boolean $link = false, boolean $active_ids = false, boolean $active_code = false, boolean $remove_ids = false, boolean $removed_ids_code = false, boolean $ul_class_name = false, boolean $include_first = false ) : sting
$parent integer
$link boolean
$active_ids boolean
$active_code boolean
$remove_ids boolean
$removed_ids_code boolean
$ul_class_name boolean
$include_first boolean
Résultat sting Prints the pages tree

paging() public méthode

paging
Author: Microweber
public paging ( $params ) : string
$params ['num'] = 5; //the numer of pages
Résultat string - html string with ul/li

ping() public méthode

public ping ( )

prev_content() public méthode

public prev_content ( $content_id = false )

reorder() public méthode

public reorder ( $params )

save() public méthode

public save ( $data, $delete_the_cache = true )

save_content() public méthode

public save_content ( $data, $delete_the_cache = true )

save_content_admin() public méthode

------------------------------------------------------------------------
public save_content_admin ( $data, $delete_the_cache = true )

save_content_data_field() public méthode

public save_content_data_field ( $data, $delete_the_cache = true )

save_content_field() public méthode

public save_content_field ( $data, $delete_the_cache = true )

save_edit() public méthode

public save_edit ( $post_data )

set_published() public méthode

Set is_active flag 'y'
public set_published ( string | array | boolean $params ) : string
$params string | array | boolean
Résultat string The url of the content

set_table_names() public méthode

Sets the database table names to use by the class.
public set_table_names ( array | boolean $tables = false )
$tables array | boolean

set_unpublished() public méthode

Set is_active flag 'n'
See also: content_set_unpublished()
public set_unpublished ( string | array | boolean $params ) : string
$params string | array | boolean
Résultat string The url of the content

site_templates() public méthode

public site_templates ( )

title() public méthode

public title ( $id )

Property Details

$app public_oe property

public Application,Microweber $app
Résultat Microweber\Application

$no_cache public_oe property

Boolean that indicates the usage of cache while making queries.
public $no_cache

$skip_pages_starting_with_url public_oe static_oe property

public static $skip_pages_starting_with_url

$table_prefix public_oe property

public $table_prefix

$tables public_oe property

public $tables