HIGH_PRIORITY
HIGH_PRIORITY
mf |
formField | Defines the base functions required from a form field. |
mfIndexable | List the methods an indexable subclass of dbRecord should implement to be indexed in the database. |
module | Defines the base functions required from a plugin module. A plugin module is a panel for editing plugin data in the backend, or for managing and displaying data in the frontend. |
plugin | Defines the base functions required for a plugin. A plugin is a container holding one or several modules and records required to accomplish a specific task or adding a specific set of features to MindFlow. |
altLangField | Defines an alternate language for the current record |
backend | Handles processing and display of the MindFlow backend. The backend is the administration user interface for an application or website. |
checkboxField | Defines a checkbox field |
colorField | Defines a color picker based on bootstrap 3 colorpicker |
Colors | |
Colors | |
contact | Base class for handling database records and their forms. |
contacts | |
contactsPlugin | |
countriesFilter | Manages the content of simple forms. |
dateField | Defines a date field based on bootstrap 3 datepicker version 4.17 |
dateTimeField | Defines a datetime field based on bootstrap 3 datepicker version 4.17 |
dbForm | Manages the content of simple forms. |
dbManager | Gives access to a database using MindFlow's configuration parameters |
dbRecord | Base class for handling database records and their forms. |
event | Base class for handling database records and their forms. |
events | |
eventsPlugin | |
ExceptionThrower | Utility for catching PHP errors and converting them to an exception that can be caught at runtime |
fieldset | Adds a fieldset tag to the form |
filesField | Defines a file upload field, allowing simultaneous upload of multiple files and allowing control of the file extensions allowed. |
formsManager | Handles record forms and simple forms display and processing |
franceFilter | Manages the content of simple forms. |
frontend | Handles processing and display of the MindFlow frontend. The frontend displays a website or an application's data. |
hiddenField | Defines a hidden field |
htmlField | Defines a free html field, allowing the developper to add any arbitrary HTML code to the form. |
inputField | Defines a typical input field |
installToolLoginForm | This form provides the identification fields to the install tool. |
l10nManager | Handles localization of Mindflow frontend and backend. |
manageCountries | |
manageFrance | |
manageSearchIndex | |
mf | |
mfAuthentification | |
mfAuthentificationPlugin | |
mfColissimoFees | Base class for handling database records and their forms. |
mfCountry | Base class for handling database records and their forms. |
mfCountryDataPlugin | |
mfDepartement | Base class for handling database records and their forms. |
mfFrance | Base class for handling database records and their forms. |
mfSearchEnginePlugin | |
mfSearchIndex | Base class for handling database records and their forms. |
mfUser | Base class for handling database records and their forms. |
mfUserGroup | Base class for handling database records and their forms. |
mfUsersPlugin | |
microtemplateField | Defines a microtemplate field, where the developper can specify a list of field and map them to a portion of HTML code, such as a news block for exemple |
page | Base class for handling database records and their forms. |
pages | |
pagesPlugin | |
pluginManager | Handles all plugin related tasks. |
portfolio | |
portfolioCategory | Base class for handling database records and their forms. |
portfolioItem | Base class for handling database records and their forms. |
portfolioPlugin | |
radioField | Defines a radio field |
recordEditTableField | Defines a recordEditTable field, allowing to display a list of records from another table inside a form field. recordEditTable and recordSelectField allow to create a one to may relationship. |
recordSelectField | Defines a recordSelect field, allowing to display a list of records from another table inside a form field. recordEditTable and recordSelectField allow to create a one to may relationship. |
ressourceIdentifier | |
richTextField | Defines a rich text field based on CKEditor + KCFinder plugin (for uploading files associated with links and pictures) |
rid | Ressource ID storage acts as a global memory for MindFlow and websites. |
searchIndexer | |
searchIndexFilter | Manages the content of simple forms. |
selectField | Creates a simple select field populated by the values supplied by the developper as an array into the 'possibleValues' attribute |
simpleRecord | Base class for database records, without form managment nor load/store functions |
siteInfo | Base class for handling database records and their forms. |
siteInfosPlugin | |
templateDataField | Displays the form out of a templateData field. Must be used in conjunction with a templateNameField. The templateData field will hold the template values, while the templateName will point to the name of the datastructure used as definition. |
templateNameField | Allows to select a template name among a list of templates. |
textareaField | Creates a simple textarea field. You can specify the number of columns and rows by adding their count in the dataType definition : 'dataType' => 'textarea 50 5' //for 50 columns and 5 rows |
timeField | Defines a time field based on bootstrap 3 datepicker version 4.17 |
urlInputField | Field for typing URLs. Very basic stuff, requires to be improved. |
urlRewriter | |
urlRewriterPlugin | |
userGroups | |
users | |
usersForm | Manages the content of simple forms. |
webSearch | |
welcome | |
welcomePlugin |
array_merge_recursive_distinct(array $array1, array $array2) : array
array_merge_recursive does indeed merge arrays, but it converts values with duplicate keys to arrays rather than overwriting the value in the first array with the duplicate value in the second array, as array_merge does. I.e., with array_merge_recursive, this happens (documented behavior):
array_merge_recursive(array('key' => 'org value'), array('key' => 'new value'));
=> array('key' => array('org value', 'new value'));
array_merge_recursive_distinct does not change the datatypes of the values in the arrays. Matching keys' values in the second array overwrite those in the first array, as is the case with array_merge, i.e.:
array_merge_recursive_distinct(array('key' => 'org value'), array('key' => 'new value'));
=> array('key' => array('new value'));
Parameters are passed by reference, though only for performance reasons. They're not altered by this function.
array | $array1 | |
array | $array2 |
checkSec() : boolean
checks the sec and fields parameters from $_REQUEST have not been altered regarding secured fields.
If the value of one of the fields listed in $_REQUEST['fields'] has been altered, the hash will mismatch and the function will return a false status
the check success. False if fields verification fails.
crop( $image, integer|array $x1, integer $y1, integer $x2, integer $y2, $originalWidth, $originalHeight) : \ImageManipulator
Crop image
$image | ||
integer|array | $x1 | Top left x-coordinate of crop box or array of coordinates |
integer | $y1 | Top left y-coordinate of crop box |
integer | $x2 | Bottom right x-coordinate of crop box |
integer | $y2 | Bottom right y-coordinate of crop box |
$originalWidth | ||
$originalHeight |
for a fluent interface
generateCallTrace() : string
Displays a backtrace of the calling function, without displaying the function call arguments, which often turns the standard PHP function debug_print_backtrace() unreadable.
the backtrace text. Wrap it with nl2br() if you want to display it as HTML.
getImageResizedDimensions( $orig_width, $orig_height, $max_width, $max_height) : array
Computes the dimension of a resized image without actually processing the image
$orig_width | ||
$orig_height | ||
$max_width | maximum width after resizing : if the image is wider than higher this limit will be used. |
|
$max_height | maximum height after resizing : if the image is higher than wider this limit will be used. |
width computed width as 'width' and computed height as 'height' indices
getSec( $securedURLParameters) : array
Generates the values required to secure a form. The user inputs an associative array of the values of the form which should never be altered during the request.
$securedURLParameters | an associative array of the URL parameters and their values in input, such as array('action' => 'saveRecord', 'record_class' => 'myContact', 'record_uid' => '29'); |
an associative array featuring the useful values to include in your request :
'parameters' will return action=saveRecord&record_class=myContact&record_uid=29
'hash' will return a sha256 salted hash of the supplied values
'fields' will return the coma separated list of fields to check
logMails( $from, $to, $subject, $textToLog)
Logs sent email information into the logfile configured into $config[$mf->getLocale()]['enableEmailLog']
$from | email address of the sender |
|
$to | email address of the recipient |
|
$subject | subject of the email |
|
$textToLog | text to be put in the log |
makeHTMLActionLink( $action, string $recordClass = '', $recordUid, $includeCssAndJs = false, $parentClass = '', $parentUid)
Creates a link to ajax-core-html.php with secured form parameters
@param string $action an action available from ajax-core-html.php, such as 'editRecord' or 'viewRecord'
$action | ||
string | $recordClass | the class of the record to process @param int|string $recordUid the uid of the record to be edited. @param boolean $includeCssAndJs tell mindflow to include all required CSS and JS code. This is usefull if the given HTML is displayed in an open window instead of an AJAX Window @param string $parentClass when you create a record from another, you may want to indicate the class of the record it is created from @param int $parentUid when you create a record from another, you may want to indicate the uid of the record it is created from @return string the link to get the content action executed |
$recordUid | ||
$includeCssAndJs | ||
$parentClass | ||
$parentUid |
makeJSONActionLink( $action, string $recordClass, $recordUid)
Creates a link to ajax-core-json.php with secured form parameters
@param string $action an action available from ajax-core-html.php, such as 'editRecord' or 'viewRecord'
$action | ||
string | $recordClass | the class of the record to process @param int|string $recordUid the uid of the record to be edited. @return string the link to get the content action executed |
$recordUid |
replace_between( $str, $needle_start, $needle_end, $replacement) : mixed
Seeks and replaces text between 2 markers ($needle_start, $needle_end) into a target string
$str | String the target string |
|
$needle_start | String marker for start |
|
$needle_end | String marker for end |
|
$replacement | String the new text to be inserted between the markers |
replace_between( $str, $needle_start, $needle_end, $replacement) : mixed
Seeks and replaces text between 2 markers ($needle_start, $needle_end) into a target string
$str | String the target string |
|
$needle_start | String marker for start |
|
$needle_end | String marker for end |
|
$replacement | String the new text to be inserted between the markers |
resizeImage( $filename, $max_width, $max_height) : \image
Resize an image and keep the proportions
$filename | the file to be processed |
|
$max_width | maximum width after resizing : if the image is wider than higher this limit will be used. |
|
$max_height | maximum height after resizing : if the image is higher than wider this limit will be used. |
setSection( $targetName, $tagName, $sectionCode, $targetCode, $decay) : mixed
Inserts or replaces a section of code into existing code.
Here is how the code would look prior the insertion :
This is some previous code //{targetName} This is some following code
Now here is how it would look after the insertion :
This is some previous code //[tagName] the code that should be inserted (section code) //[/tagName] //{targetName} This is some following code
Any new insertion using the same tag name will replace the existing section. Any new insertion using a different tag name will append the section to the existing code.
$targetName | String this is the name of the target marker where the section to be inserted should be positionned if the section tags are not already present. A target named "module_insert_form" looks like //{module_insert_form} in the code. |
|
$tagName | String this is the tag name for a given section of code, which allows to locate it and replace it at a later time if the code of this section needs to be replaced. For example, if the tag name is "item_123", the function will attempt to replace the code between //[item_123] and //[/item_123] |
|
$sectionCode | ||
$targetCode | ||
$decay | String The characters, tabs or spaces, to put in front of the inserted code so it is correctly indented |
setSection( $targetName, $tagName, $sectionCode, $targetCode, $decay) : mixed
Inserts or replaces a section of code into existing code.
Here is how the code would look prior the insertion :
This is some previous code //{targetName} This is some following code
Now here is how it would look after the insertion :
This is some previous code //[tagName] the code that should be inserted (section code) //[/tagName] //{targetName} This is some following code
Any new insertion using the same tag name will replace the existing section. Any new insertion using a different tag name will append the section to the existing code.
$targetName | String this is the name of the target marker where the section to be inserted should be positionned if the section tags are not already present. A target named "module_insert_form" looks like //{module_insert_form} in the code. |
|
$tagName | String this is the tag name for a given section of code, which allows to locate it and replace it at a later time if the code of this section needs to be replaced. For example, if the tag name is "item_123", the function will attempt to replace the code between //[item_123] and //[/item_123] |
|
$sectionCode | ||
$targetCode | ||
$decay | String The characters, tabs or spaces, to put in front of the inserted code so it is correctly indented |
truncateHtml(string $text, integer $length = 100, string $ending = '...', boolean $exact = false, boolean $considerHtml = true) : string
truncateHtml can truncate a string up to a number of characters while preserving whole words and HTML tags
string | $text | String to truncate. |
integer | $length | Length of returned string, including ellipsis. |
string | $ending | Ending to be appended to the trimmed string. |
boolean | $exact | If false, $text will not be cut mid-word |
boolean | $considerHtml | If true, HTML tags would be handled correctly |
Trimmed string.
validateDate( $date) : boolean
Validates a given date string formated as specified in $GLOBALS['site_locales'][$mf->getLocale()]['php_date_format'], returning true or false. Makes use of the standard PHP function checkdate()
$date | a date formated according to the current display locale |
validation result
writeFile( $filePath, $fileContent)
Writes the fileContent into a file located at filePath. Queries the user for authorization to overwrite the file if it already exists.
This function is meant to be used in cli mode.
$filePath | String relative path to the target file |
|
$fileContent | String the content to be written into the file |
writeFile( $filePath, $fileContent)
Writes the fileContent into a file located at filePath. Queries the user for authorization to overwrite the file if it already exists.
This function is meant to be used in cli mode.
$filePath | String relative path to the target file |
|
$fileContent | String the content to be written into the file |