PHP Класс Microweber\Providers\ContentManager

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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 )

Описание методов

__construct() публичный Метод

public __construct ( $app = null )

attributes() публичный Метод

public attributes ( $content_id )

breadcrumb() публичный Метод

public breadcrumb ( $params = false )

custom_fields() публичный Метод

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

data() публичный Метод

public data ( $content_id )

define_constants() публичный Метод

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

edit_field() публичный Метод

public edit_field ( $data, $debug = false )

get() публичный Метод

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
Результат array | boolean | mixed Array of content or false if nothing is found

get_by_id() публичный Метод

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
Результат array

get_by_url() публичный Метод

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

get_children() публичный Метод

public get_children ( $id, $without_main_parrent = false )

get_data() публичный Метод

public get_data ( $params = false )

get_inherited_parent() публичный Метод

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

get_page() публичный Метод

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
Результат array The page row from the database

get_pages() публичный Метод

public get_pages ( $params = false )

get_parents() публичный Метод

public get_parents ( $id, $without_main_parrent = false )

get_posts() публичный Метод

public get_posts ( $params = false )

get_products() публичный Метод

public get_products ( $params = false )

homepage() публичный Метод

Returns the homepage as array.
public homepage ( )

lang_current() публичный Метод

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

lang_set() публичный Метод

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

next_content() публичный Метод

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

pages_tree() публичный Метод

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
Результат sting Prints the pages tree

paging() публичный Метод

paging
Автор: Microweber
public paging ( $params ) : string
$params ['num'] = 5; //the numer of pages
Результат string - html string with ul/li

ping() публичный Метод

public ping ( )

prev_content() публичный Метод

public prev_content ( $content_id = false )

reorder() публичный Метод

public reorder ( $params )

save() публичный Метод

public save ( $data, $delete_the_cache = true )

save_content() публичный Метод

public save_content ( $data, $delete_the_cache = true )

save_content_admin() публичный Метод

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

save_content_data_field() публичный Метод

public save_content_data_field ( $data, $delete_the_cache = true )

save_content_field() публичный Метод

public save_content_field ( $data, $delete_the_cache = true )

save_edit() публичный Метод

public save_edit ( $post_data )

set_published() публичный Метод

Set is_active flag 'y'
public set_published ( string | array | boolean $params ) : string
$params string | array | boolean
Результат string The url of the content

set_table_names() публичный Метод

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

set_unpublished() публичный Метод

Set is_active flag 'n'
См. также: content_set_unpublished()
public set_unpublished ( string | array | boolean $params ) : string
$params string | array | boolean
Результат string The url of the content

site_templates() публичный Метод

public site_templates ( )

title() публичный Метод

public title ( $id )

Описание свойств

$app публичное свойство

public Application,Microweber $app
Результат Microweber\Application

$no_cache публичное свойство

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

$skip_pages_starting_with_url публичное статическое свойство

public static $skip_pages_starting_with_url

$table_prefix публичное свойство

public $table_prefix

$tables публичное свойство

public $tables