Dotclear 2.24
Loading...
Searching...
No Matches
dcPage Class Reference

Static Public Member Functions

static check (string $permissions, bool $home=false)
 
static checkSuper (bool $home=false)
 
static open (string $title='', string $head='', string $breadcrumb='', array $options=[])
 
static notices ()
 
static addMessageNotice (string $message, array $options=[])
 
static addSuccessNotice (string $message, array $options=[])
 
static addWarningNotice (string $message, array $options=[])
 
static addErrorNotice (string $message, array $options=[])
 
static message (string $msg, bool $timestamp=true, bool $div=false, bool $echo=true, ?string $class=null)
 
static success (string $msg, bool $timestamp=true, bool $div=false, bool $echo=true)
 
static warning (string $msg, bool $timestamp=true, bool $div=false, bool $echo=true)
 
static error (string $msg, bool $timestamp=true, bool $div=false, bool $echo=true)
 
static close ()
 
static openPopup (string $title='', string $head='', string $breadcrumb='')
 
static closePopup ()
 
static breadcrumb (?array $elements=null, array $options=[])
 
static helpBlock (... $params)
 
static preload (string $src, ?string $version='', string $type='style')
 
static cssLoad (string $src, string $media='screen', ?string $version='')
 
static cssModuleLoad (string $src, string $media='screen', ?string $version='')
 
static jsLoad (string $src, ?string $version='')
 
static jsModuleLoad (string $src, ?string $version='')
 
static jsJson (string $id, $vars)
 
static jsToggles ()
 
static jsCommon ()
 
static jsAdsBlockCheck ()
 
static jsConfirmClose (... $args)
 
static jsPageTabs ($default=null)
 
static jsModal ()
 
static jsUpload (array $params=[], ?string $base_url=null)
 
static jsMetaEditor ()
 
static jsFilterControl (bool $show=true)
 
static jsLoadCodeMirror (string $theme='', bool $multi=true, array $modes=['css', 'htmlmixed', 'javascript', 'php', 'xml', 'clike'])
 
static jsRunCodeMirror ($name, ?string $id=null, $mode=null, string $theme='')
 
static getCodeMirrorThemes ()
 
static getPF (string $file)
 
static getVF (string $file)
 
static setXFrameOptions ($headers, $origin=null)
 
static help ()
 
static jsColorPicker ()
 
static jsDatePicker ()
 
static jsToolBar ()
 
static jsVar (string $name, $value)
 
static jsVars (array $vars)
 
static jsLoadIE7 ()
 

Member Function Documentation

◆ check()

◆ checkSuper()

◆ open()

◆ notices()

◆ addMessageNotice()

static addMessageNotice ( string  $message,
array  $options = [] 
)
static

Adds a message notice.

Parameters
string$messageThe message
array$optionsThe options

References $message, dcAdminNotices\addNotice(), and dcAdminNotices\NOTICE_MESSAGE.

◆ addSuccessNotice()

static addSuccessNotice ( string  $message,
array  $options = [] 
)
static

Adds a success notice.

Parameters
string$messageThe message
array$optionsThe options

References $message, dcAdminNotices\addNotice(), and dcAdminNotices\NOTICE_SUCCESS.

Referenced by tagsBehaviors\adminAddTags(), tagsBehaviors\adminRemoveTags(), dcDefaultCommentActions\doBlocklistIP(), dcDefaultBlogActions\doChangeBlogStatus(), dcDefaultCommentActions\doChangeCommentStatus(), dcDefaultPostActions\doChangePostAuthor(), dcDefaultPostActions\doChangePostCategory(), dcDefaultPostActions\doChangePostLang(), dcDefaultPostActions\doChangePostStatus(), dcDefaultBlogActions\doDeleteBlog(), dcDefaultCommentActions\doDeleteComment(), dcDefaultPostActions\doDeletePost(), dcDefaultPageActions\doReorderPages(), dcDefaultPostActions\doUpdateSelectedPost(), dcFilterAkismet\gui(), dcFilterIP\gui(), dcFilterIpLookup\gui(), dcFilterIPv6\gui(), dcFilterWords\gui(), adminBlog\process(), adminBlogDel\process(), adminCategories\process(), adminCategory\process(), adminComment\process(), adminLangs\process(), adminMedia\process(), adminMediaItem\process(), adminPost\process(), adminPostMedia\process(), adminUserPrefs\process(), adminUser\process(), adminUsersActions\process(), adminAboutConfig\process(), adminAntispam\process(), adminBlogrollEdit\process(), adminBlogroll\process(), adminBlowupConfig\process(), adminCKEditor\process(), adminLegacyEditor\process(), adminMaintenance\process(), adminPings\process(), adminSimpleMenu\process(), adminTag\process(), adminThemeEditor\process(), and adminUserPreferences\process().

◆ addWarningNotice()

static addWarningNotice ( string  $message,
array  $options = [] 
)
static

Adds a warning notice.

Parameters
string$messageThe message
array$optionsThe options

References $message, dcAdminNotices\addNotice(), and dcAdminNotices\NOTICE_WARNING.

Referenced by dcModules\disableDepModules(), dcDefaultBlogActions\doDeleteBlog(), adminMedia\process(), and adminUser\process().

◆ addErrorNotice()

static addErrorNotice ( string  $message,
array  $options = [] 
)
static

Adds an error notice.

Parameters
string$messageThe message
array$optionsThe options

References $message, dcAdminNotices\addNotice(), and dcAdminNotices\NOTICE_ERROR.

Referenced by adminCategories\process(), and adminSimpleMenu\process().

◆ message()

static message ( string  $msg,
bool  $timestamp = true,
bool  $div = false,
bool  $echo = true,
?string  $class = null 
)
static

Return/display a notice

Parameters
string$msgThe message
bool$timestampInclude the timestamp
bool$divThe message container, true for
, false for
bool$echo
Immediatly displayed
string$class
The class to use
Returns
string The notice

References dcAdminNotices\message().

Referenced by adminConfigThemeCustomCSS\process(), adminConfigThemeDuctile\process(), adminComments\render(), adminPost\render(), adminUsers\render(), and adminPage\render().

◆ success()

static success ( string  $msg,
bool  $timestamp = true,
bool  $div = false,
bool  $echo = true 
)
static

Return/display a success notice

Parameters
string$msgThe message
bool$timestampInclude the timestamp
bool$divThe message container, true for
, false for
bool$echo
Immediatly displayed
Returns
string The notice

References dcAdminNotices\success().

Referenced by dcImportFeed\gui(), dcImportFlat\gui(), adminMedia\process(), adminBlogTheme\render(), adminCategories\render(), adminCategory\render(), adminComment\render(), adminComments\render(), adminLangs\render(), adminPlugins\render(), adminPost\render(), adminPosts\render(), adminUpdate\render(), adminUser\render(), adminAntispam\render(), adminPages\render(), and adminPage\render().

◆ warning()

static warning ( string  $msg,
bool  $timestamp = true,
bool  $div = false,
bool  $echo = true 
)
static

Return/display a warning notice

Parameters
string$msgThe message
bool$timestampInclude the timestamp
bool$divThe message container, true for
, false for
bool$echo
Immediatly displayed
Returns
string The notice

References dcAdminNotices\warning().

Referenced by adminMedia\render().

◆ error()

static error ( string  $msg,
bool  $timestamp = true,
bool  $div = false,
bool  $echo = true 
)
static

Return/display a error notice

Parameters
string$msgThe message
bool$timestampInclude the timestamp
bool$divThe message container, true for
, false for
bool$echo
Immediatly displayed
Returns
string The notice

References dcAdminNotices\error().

◆ close()

◆ openPopup()

static openPopup ( string  $title = '',
string  $head = '',
string  $breadcrumb = '' 
)
static

The top of a popup.

Parameters
string$titleThe title
string$headThe head
string$breadcrumbThe breadcrumb

References dcCore\app(), cssLoad(), DC_VENDOR_NAME, DC_VERSION, html\escapeHTML(), l10n\getLanguageTextDirection(), dcAdminNotices\getNotices(), jsCommon(), dcUtils\jsJson(), jsToggles(), and preload().

Referenced by adminMediaPage\openPage(), adminPopupLink\render(), and adminPopupPosts\render().

◆ closePopup()

static closePopup ( )
static

◆ breadcrumb()

◆ helpBlock()

◆ preload()

static preload ( string  $src,
?string  $version = '',
string  $type = 'style' 
)
static

Get HTML code to preload resource

Parameters
string$srcThe source
null | string$versionThe version
string$typeThe type
Returns
string

References $version, and html\escapeHTML().

Referenced by open(), and openPopup().

◆ cssLoad()

static cssLoad ( string  $src,
string  $media = 'screen',
?string  $version = '' 
)
static

Get HTML code to load CSS stylesheet

Parameters
string$srcThe source
string$mediaThe media
null | string$versionThe version
Returns
string

References $version, and html\escapeHTML().

Referenced by themeEditorBehaviors\adminPreferencesForm(), cssModuleLoad(), jsLoadCodeMirror(), open(), and openPopup().

◆ cssModuleLoad()

static cssModuleLoad ( string  $src,
string  $media = 'screen',
?string  $version = '' 
)
static

Wrapper for cssLoad to be used by module

Parameters
string$srcThe source
string$mediaThe media
null | string$versionThe version
Returns
string

References $version, and cssLoad().

Referenced by tagsBehaviors\adminAddTags(), dcLegacyEditorBehaviors\jsToolBar(), tagsBehaviors\postHeaders(), adminAntispam\render(), adminImportExport\render(), adminTag\render(), adminTags\render(), adminThemeEditor\render(), and adminWidgets\render().

◆ jsLoad()

◆ jsModuleLoad()

◆ jsJson()

◆ jsToggles()

static jsToggles ( )
static

Get HTML code to load toggles JS

Returns
string

References dcCore\app(), jsJson(), and jsLoad().

Referenced by open(), and openPopup().

◆ jsCommon()

static jsCommon ( )
static

Get HTML code to load common JS for admin pages

Returns
string

References dcCore\app(), jsJson(), and jsLoad().

Referenced by open(), openPopup(), and adminAuth\render().

◆ jsAdsBlockCheck()

static jsAdsBlockCheck ( )
static

Get HTML code to load ads blocker detector for admin pages (usually active on dashboard and user preferences pages)

Returns
string

References dcCore\app(), and jsLoad().

Referenced by adminIndex\render(), and adminUserPrefs\render().

◆ jsConfirmClose()

static jsConfirmClose (   $args)
static

◆ jsPageTabs()

◆ jsModal()

static jsModal ( )
static

Get HTML code to load Magnific popup JS

Returns
string

References jsLoad().

Referenced by adminMedia\render(), adminPost\render(), and adminPage\render().

◆ jsUpload()

static jsUpload ( array  $params = [],
?string  $base_url = null 
)
static

Get HTML to load Upload JS utility

Parameters
array$paramsThe parameters
null | string$base_urlThe base url
Returns
string

References dcCore\app(), path\clean(), jsJson(), and jsLoad().

Referenced by adminMedia\render().

◆ jsMetaEditor()

static jsMetaEditor ( )
static

Get HTML code to load meta editor

Returns
string

References jsLoad().

Referenced by tagsBehaviors\adminAddTags(), and adminPost\render().

◆ jsFilterControl()

static jsFilterControl ( bool  $show = true)
static

Get HTML code for filters control JS utility

Parameters
bool$showShow filters?
Returns
string

References dcCore\app(), jsJson(), and jsLoad().

Referenced by adminGenericFilterV2\js().

◆ jsLoadCodeMirror()

static jsLoadCodeMirror ( string  $theme = '',
bool  $multi = true,
array  $modes = ['css', 'htmlmixed', 'javascript', 'php', 'xml', 'clike'] 
)
static

Get HTML code to load Codemirror

Parameters
string$themeThe theme
bool$multiIs multiplex?
array$modesThe modes
Returns
string

References $ret, cssLoad(), and jsLoad().

Referenced by themeEditorBehaviors\adminPreferencesForm(), and adminThemeEditor\render().

◆ jsRunCodeMirror()

static jsRunCodeMirror (   $name,
?string  $id = null,
  $mode = null,
string  $theme = '' 
)
static

Get HTML code to run Codemirror

Parameters
mixed$nameThe HTML name attribute
null | string$idThe HTML id attribute
mixed$modeThe Codemirror mode
string$themeThe theme
Returns
string

References jsJson(), and jsLoad().

Referenced by adminThemeEditor\render().

◆ getCodeMirrorThemes()

static getCodeMirrorThemes ( )
static

Gets the codemirror themes list.

Returns
array The code mirror themes.

Referenced by themeEditorBehaviors\adminPreferencesForm().

◆ getPF()

static getPF ( string  $file)
static

◆ getVF()

static getVF ( string  $file)
static

Gets var file.

Parameters
string$fileThe filename
Returns
string The URL.

References dcCore\app().

◆ setXFrameOptions()

static setXFrameOptions (   $headers,
  $origin = null 
)
static

Sets the x frame options.

Parameters
array | ArrayObject$headersThe headers
mixed$originThe origin

Referenced by open().

◆ help()

static help ( )
static
Deprecated:
since 2.24

◆ jsColorPicker()

static jsColorPicker ( )
static
Deprecated:
since version 2.16
Returns
string

◆ jsDatePicker()

static jsDatePicker ( )
static

Get HTML code for date picker JS utility

Deprecated:
since 2.21
Returns
string

◆ jsToolBar()

static jsToolBar ( )
static

Load jsToolBar

Deprecated:
since 2.??
Returns
string

◆ jsVar()

static jsVar ( string  $name,
  $value 
)
static

return a javascript variable definition line code

Deprecated:
2.15 use dcPage::jsJson() and dotclear.getData()/dotclear.mergeDeep() in javascript
Parameters
string$namevariable name
mixed$valuevalue
Returns
string javascript code

References html\escapeJS().

◆ jsVars()

static jsVars ( array  $vars)
static

return a list of javascript variables définitions code

Deprecated:
2.15 use dcPage::jsJson() and dotclear.getData()/dotclear.mergeDeep() in javascript
Parameters
array$varsThe variables
Returns
string javascript code (inside <script></script>)

References $ret, and html\escapeJS().

◆ jsLoadIE7()

static jsLoadIE7 ( )
static
Deprecated:
since version 2.11
Returns
string ( description_of_the_return_value )

The documentation for this class was generated from the following file: