SCHLIX\cmsWysiwygEditor

Inherited from cmsTemplateViewer
Implements interface_cmsEditor
Inherits CKEditor4, CodeMirror, blank

Protected Attributes

protected $forbidden_names= []
protected $editor_name= null
protected $profile_id 
protected $profile_name 
protected $wysiwyg_config 
protected $config 
protected $default_profiles= []

Protected Methods

protected arrayverifyDirBasedExtensions(\SCHLIX\cmsDirectoryFilter $items, $file_to_check='')
Verify folder name
protected stringforceDefaultConfigOptions(array $options)
The options specified here cannot be modified by user configuration

Public Methods

public __construct(string $profile_id)
Constructor
public typegetListOfDirBasedExtensions(string $from, string $type, string $file_to_check='')
Returns a list of directory based extensions, where $from is either 'system' or 'user' and $type can be any subdirectory within it, e.g. plugins, themes, languages If $file_to_check is specified, it will try to verify if that file exist in that subfolder
public typegetListOfFileBasedExtensions(string $from, string $type, string $ext)
Returns a list of file based extensions, where $from is either 'system' or 'user' and $type can be any subdirectory within it, e.g. plugins, themes, languages
public ensureDefaultProfilesExist()
Ensure default profiles exists @global \App\wysiwygEditors $WYSIWYGEditor
public typegetListOfExtensions(string $from, string $type)
Returns a list of extensions, where $from is either 'system' or 'user' and $type can be any subdirectory within it, e.g. plugins, themes, languages
public stringgetExtensionURLPath(string $from, string $type, string $item='')
Returns extension URL path, where $from is either system or user, $type is the subdirectory, and $item is the specific extension
public stringgetExtensionFullPath(string $from, string $type, string $item='')
Returns extension path, where $from is either system or user, $type is the subdirectory, and $item is the specific extension
public arrayonModifyDataBeforeSaveConfig(array $datavalues)
Modify data before save config @global \App\Users $CurrentUser
public onAfterSaveConfig(int $profile_id)
After config has been saved
public arraygenerateConfigurationArrayFromConfig()
Returns a key/value array from the config. If the config key contains a prefix of str_config_ or bool_config_ or int_config_, then it will be moved into 'processed' key in the result array, otherwise it will be moved to 'unprocessed' key
public stringgenerateConfigurationScriptFromConfigArray(array $config)
Generate configuration script
public stringmodifyUnprocessedConfig(string $array_config)
Given $array_config containing 2 keys: unprocessed and processed, process them and move it to $array_config['processed']
public reloadConfigFromDatabase()
public loadProfileByID(int $profile_id)
Initialize current editor and load it by profile ID
public getConfig($key, $default=null)
public stringgetHeaderVariableInitScript(string $url)
Returns extra header script, given $url where it's the load config URL
public booleanviewInitScript()
View init script
public Run(array $command)
Run a command