ContentManagerContentNavigationTrait
ContentManagerContentNavigationTrait.inc.php 2022-08-04 Gambio GmbH http://www.gambio.de Copyright (c) 2022 Gambio GmbH Released under the GNU General Public License (Version 2) [http://www.gnu.org/licenses/gpl-2.0.html]
Table of Contents
- $contentTypeFileFlagMap : array<string|int, mixed>
- $fileTypMap : array<string|int, mixed>
- Order of this array is important as it will update the file flag in the database on updating
- $isExpertMode : bool
- _createContentNavigation() : ContentNavigationCollection
- Creates the content navigation object for the content manager templates.
- _createNewContentGroupId() : int
- Creates a new content group id.
- _getAssets() : AssetCollection
- Returns the assets for the content manager editing and creation pages.
- _getContentType() : string
- Returns the content type of the given query result.
- _getProductsContentFiles() : array<string|int, mixed>
- Returns an array with allowed script files for content data.
- _getScriptPageFiles() : array<string|int, mixed>
- Returns an array with allowed script files for content data.
- _getTemplate() : ExistingFile
- Returns an existing file object with the path to a content manager template file.
- _getUpdateResponse() : RedirectHttpControllerResponse
- Whether redirects to the last overview or update pages.
- _insertContentData() : $this|ContentManagerPagesController
- Inserts the given content data in the database.
- _isFilemanagerAvailable() : bool
- Returns true if the "Responsive File Manager" is installed an false otherwise.
- _prepareContentManagerGroupCheckData() : string
- Prepares $_POST data for the content_manager's 'group_ids' column.
- _setExpertMode() : mixed
- Sets the expert mode, if the query parameter has been passed.
- _updateContentData() : $this|ContentManagerPagesController
- Updates the given content data in the database.
Properties
$contentTypeFileFlagMap
protected
array<string|int, mixed>
$contentTypeFileFlagMap
= ['pages_main' => 'topmenu', 'pages_secondary' => 'topmenu_corner', 'pages_info' => 'content', 'pages_info_box' => 'information', 'pages_additional' => 'additional', 'elements_start' => 'extraboxes', 'elements_header' => 'extraboxes', 'elements_styleedit' => 'information', 'elements_footer' => 'extraboxes', 'elements_boxes' => 'extraboxes', 'elements_others' => 'extraboxes', 'elements_withdrawal' => 'withdrawal']
$fileTypMap
Order of this array is important as it will update the file flag in the database on updating
protected
array<string|int, mixed>
$fileTypMap
= [0 => 'information', 1 => 'content', 2 => 'topmenu_corner', 3 => 'topmenu', 4 => 'extraboxes', 5 => 'withdrawal', 6 => 'additional']
$isExpertMode
protected
bool
$isExpertMode
= alse
Methods
_createContentNavigation()
Creates the content navigation object for the content manager templates.
protected
_createContentNavigation(LanguageTextManager $languageTextManager[, string|null $current = null ]) : ContentNavigationCollection
Parameters
- $languageTextManager : LanguageTextManager
-
Text manager instance to fetch texts.
- $current : string|null = null
-
(Optional) Whether "pages", "elements" or "productContents" to set nav item active.
Return values
ContentNavigationCollection —_createNewContentGroupId()
Creates a new content group id.
protected
_createNewContentGroupId(CI_DB_query_builder $queryBuilder) : int
Parameters
- $queryBuilder : CI_DB_query_builder
-
Query builder instance to access the database.
Return values
int —New content manager group id.
_getAssets()
Returns the assets for the content manager editing and creation pages.
protected
_getAssets() : AssetCollection
Return values
AssetCollection —_getContentType()
Returns the content type of the given query result.
protected
_getContentType(array<string|int, mixed> $queryResult) : string
Parameters
- $queryResult : array<string|int, mixed>
-
Data sets of query for content_manager table.
Return values
string —Whether "content", "file" or "link".
_getProductsContentFiles()
Returns an array with allowed script files for content data.
protected
_getProductsContentFiles() : array<string|int, mixed>
Return values
array<string|int, mixed> —List with allowed script files.
_getScriptPageFiles()
Returns an array with allowed script files for content data.
protected
_getScriptPageFiles() : array<string|int, mixed>
Return values
array<string|int, mixed> —List with allowed script files.
_getTemplate()
Returns an existing file object with the path to a content manager template file.
protected
_getTemplate(string $type, string $name) : ExistingFile
Take a look on the template files which are located in html/content/content_manager/$type directory to know possible values for the $name argument.
Parameters
- $type : string
-
Content manager type, whether "pages", "elements" or "product_contents".
- $name : string
-
Name of template file.
Return values
ExistingFile —_getUpdateResponse()
Whether redirects to the last overview or update pages.
protected
_getUpdateResponse(string $contentManagerType, int $contentGroupId[, mixed $editMethod = 'edit' ]) : RedirectHttpControllerResponse
Parameters
- $contentManagerType : string
-
Name of content manager controller class.
- $contentGroupId : int
-
Content id of last edited content.
- $editMethod : mixed = 'edit'
Return values
RedirectHttpControllerResponse —_insertContentData()
Inserts the given content data in the database.
protected
_insertContentData(CI_DB_query_builder $queryBuilder, array<string|int, mixed> $contentData) : $this|ContentManagerPagesController
Parameters
- $queryBuilder : CI_DB_query_builder
-
Query builder instance to access the database.
- $contentData : array<string|int, mixed>
-
Content data array.
Return values
$this|ContentManagerPagesController —Same instance for chained method calls.
_isFilemanagerAvailable()
Returns true if the "Responsive File Manager" is installed an false otherwise.
protected
_isFilemanagerAvailable() : bool
Return values
bool —_prepareContentManagerGroupCheckData()
Prepares $_POST data for the content_manager's 'group_ids' column.
protected
_prepareContentManagerGroupCheckData() : string
Return values
string —_setExpertMode()
Sets the expert mode, if the query parameter has been passed.
protected
_setExpertMode() : mixed
Return values
mixed —_updateContentData()
Updates the given content data in the database.
protected
_updateContentData(CI_DB_query_builder $queryBuilder, array<string|int, mixed> $contentData, int $contentGroupId) : $this|ContentManagerPagesController
Parameters
- $queryBuilder : CI_DB_query_builder
-
Query builder instance to access the database.
- $contentData : array<string|int, mixed>
-
Content data array.
- $contentGroupId : int
-
Content group id.
Return values
$this|ContentManagerPagesController —Same instance for chained method calls.