mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
2106 lines
114 KiB
HTML
Executable File
2106 lines
114 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Editor PHP 2.1.3</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<base href="../">
|
|
<link rel="icon" href="images/favicon.ico"/>
|
|
<link rel="stylesheet" href="css/normalize.css">
|
|
<link rel="stylesheet" href="css/base.css">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
|
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="css/template.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
|
|
<script src="js/search.js"></script>
|
|
<script defer src="js/searchIndex.js"></script>
|
|
</head>
|
|
<body id="top">
|
|
<header class="phpdocumentor-header phpdocumentor-section">
|
|
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Editor PHP 2.1.3</a></h1>
|
|
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
|
|
<label class="phpdocumentor-header__menu-icon" for="menu-button">
|
|
<i class="fas fa-bars"></i>
|
|
</label>
|
|
<section data-search-form class="phpdocumentor-search">
|
|
<label>
|
|
<span class="visually-hidden">Search for</span>
|
|
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
|
|
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
|
|
</svg>
|
|
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
|
|
</label>
|
|
</section>
|
|
|
|
<nav class="phpdocumentor-topnav">
|
|
<ul class="phpdocumentor-topnav__menu">
|
|
</ul>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="phpdocumentor">
|
|
<div class="phpdocumentor-section">
|
|
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
|
|
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
|
|
Menu
|
|
</label>
|
|
<aside class="phpdocumentor-column -four phpdocumentor-sidebar">
|
|
<section class="phpdocumentor-sidebar__category">
|
|
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
|
|
<h4 class="phpdocumentor-sidebar__root-namespace">
|
|
<a href="namespaces/datatables.html" class="">DataTables</a>
|
|
</h4>
|
|
<ul class="phpdocumentor-list">
|
|
<li>
|
|
<a href="namespaces/datatables-database.html" class="">Database</a>
|
|
|
|
</li>
|
|
<li>
|
|
<a href="namespaces/datatables-editor.html" class="">Editor</a>
|
|
|
|
</li>
|
|
<li>
|
|
<a href="namespaces/datatables-htmlawed.html" class="">HtmLawed</a>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
</section>
|
|
<section class="phpdocumentor-sidebar__category">
|
|
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
|
|
<h4 class="phpdocumentor-sidebar__root-namespace">
|
|
<a href="packages/Application.html" class="">Application</a>
|
|
</h4>
|
|
|
|
</section>
|
|
|
|
<section class="phpdocumentor-sidebar__category">
|
|
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
|
|
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
|
|
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
|
|
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
|
|
</section>
|
|
|
|
<section class="phpdocumentor-sidebar__category">
|
|
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
|
|
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
|
|
</section>
|
|
</aside>
|
|
|
|
<div class="phpdocumentor-column -eight phpdocumentor-content">
|
|
<ul class="phpdocumentor-breadcrumbs">
|
|
<li class="phpdocumentor-breadcrumb"><a href="namespaces/datatables.html">DataTables</a></li>
|
|
<li class="phpdocumentor-breadcrumb"><a href="namespaces/datatables-editor.html">Editor</a></li>
|
|
</ul>
|
|
|
|
<article class="phpdocumentor-element -class">
|
|
<h2 class="phpdocumentor-content__title">
|
|
Field
|
|
|
|
<span class="phpdocumentor-element__extends">
|
|
extends <a href="classes/DataTables-Ext.html"><abbr title="\DataTables\Ext">Ext</abbr></a>
|
|
</span>
|
|
|
|
<div class="phpdocumentor-element__package">
|
|
in package
|
|
<ul class="phpdocumentor-breadcrumbs">
|
|
<li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
</h2>
|
|
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">65</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.65" class="phpdocumentor-element-found-in__source" data-line="65" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Field definitions for the DataTables Editor.</p>
|
|
|
|
<section class="phpdocumentor-description"><p>Each Database column that is used with Editor can be described with this
|
|
Field method (both for Editor and Join instances). It basically tells
|
|
Editor what table column to use, how to format the data and if you want
|
|
to read and/or write this column.</p>
|
|
<p>Field instances are used with the Editor->field() and
|
|
Join->field() methods to describe what fields should be interacted
|
|
with by the editable table.</p>
|
|
</section>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h5>
|
|
<dl class="phpdocumentor-tag-list">
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">example</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
|
|
<section class="phpdocumentor-description"><p>Simply get a column with the name "city". No validation is performed.</p>
|
|
<pre class="prettyprint"><code class="language-php"> Field::inst( 'city' )
|
|
</code></pre>
|
|
<p>@example
|
|
Get a column with the name "first_name" - when edited a value must
|
|
be given due to the "required" validation from the <a href="classes/DataTables-Editor-Validate.html"><abbr title="\DataTables\Editor\Validate">Validate</abbr></a> class.</p>
|
|
<pre class="prettyprint"><code class="language-php"> Field::inst( 'first_name' )->validator( 'Validate::required' )
|
|
</code></pre>
|
|
<p>@example
|
|
Working with a date field, which is validated, and also has <em>get</em> and
|
|
<em>set</em> formatters.</p>
|
|
<pre class="prettyprint"><code class="language-php"> Field::inst( 'registered_date' )
|
|
->validator( 'Validate::dateFormat', 'D, d M y' )
|
|
->getFormatter( 'Format::date_sql_to_format', 'D, d M y' )
|
|
->setFormatter( 'Format::date_format_to_sql', 'D, d M y' )
|
|
</code></pre>
|
|
<p>@example
|
|
Using an alias in the first parameter</p>
|
|
<pre class="prettyprint"><code class="language-php"> Field::inst( 'name.first as first_name' )
|
|
</code></pre>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 id="toc">
|
|
Table of Contents
|
|
<a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h3>
|
|
|
|
<dl class="phpdocumentor-table-of-contents">
|
|
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
|
|
<a href="classes/DataTables-Editor-Field.html#constant_SET_BOTH">SET_BOTH</a>
|
|
<span>
|
|
= 'both' </span>
|
|
</dt>
|
|
<dd>Set option flag (`set()`) - write to database on both create and edit</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
|
|
<a href="classes/DataTables-Editor-Field.html#constant_SET_CREATE">SET_CREATE</a>
|
|
<span>
|
|
= 'create' </span>
|
|
</dt>
|
|
<dd>Set option flag (`set()`) - write to database only on create</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
|
|
<a href="classes/DataTables-Editor-Field.html#constant_SET_EDIT">SET_EDIT</a>
|
|
<span>
|
|
= 'edit' </span>
|
|
</dt>
|
|
<dd>Set option flag (`set()`) - write to database only on edit</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
|
|
<a href="classes/DataTables-Editor-Field.html#constant_SET_NONE">SET_NONE</a>
|
|
<span>
|
|
= 'none' </span>
|
|
</dt>
|
|
<dd>Set option flag (`set()`) - do not set data</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method___construct">__construct()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Field instance constructor.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_apply">apply()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Check to see if a field should be used for a particular action (get or set).</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_dbField">dbField()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get / set the DB field name.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_get">get()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get / set the 'get' property of the field.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_getFormatter">getFormatter()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get formatter for the field's data.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_getValue">getValue()</a>
|
|
<span>
|
|
: callable|string|self </span>
|
|
</dt>
|
|
<dd>Get / set a get value. If given, then this value is used to send to the
|
|
client-side, regardless of what value is held by the database.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Ext.html#method_inst">inst()</a>
|
|
<span>
|
|
: <a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a>|<a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a>|<a href="classes/DataTables-Editor-Join.html"><abbr title="\DataTables\Editor\Join">Join</abbr></a>|<a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a> </span>
|
|
</dt>
|
|
<dd>Static method to instantiate a new instance of a class (shorthand of
|
|
'instantiate').</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Ext.html#method_instantiate">instantiate()</a>
|
|
<span>
|
|
: <a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a>|<a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a>|<a href="classes/DataTables-Editor-Join.html"><abbr title="\DataTables\Editor\Join">Join</abbr></a>|<a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a> </span>
|
|
</dt>
|
|
<dd>Static method to instantiate a new instance of a class.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_name">name()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get / set the 'name' property of the field.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_options">options()</a>
|
|
<span>
|
|
: <a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a> </span>
|
|
</dt>
|
|
<dd>Get a list of values that can be used for the options list in radio,
|
|
select and checkbox inputs from the database for this field.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_searchBuilderOptions">searchBuilderOptions()</a>
|
|
<span>
|
|
: self </span>
|
|
</dt>
|
|
<dd>Get a list of values that can be used for the options list in SearchBuilder</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_searchPaneOptions">searchPaneOptions()</a>
|
|
<span>
|
|
: self </span>
|
|
</dt>
|
|
<dd>Get a list of values that can be used for the options list in SearchPanes</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_set">set()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get / set the 'set' property of the field.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_setFormatter">setFormatter()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Set formatter for the field's data.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_setValue">setValue()</a>
|
|
<span>
|
|
: callable|string|self </span>
|
|
</dt>
|
|
<dd>Get / set a set value. If given, then this value is used to write to the
|
|
database regardless of what data is sent from the client-side.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_upload">upload()</a>
|
|
<span>
|
|
: <a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a>|self </span>
|
|
</dt>
|
|
<dd>Get / set the upload class for this field.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_val">val()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get the value of the field, taking into account if it is coming from the
|
|
DB or from a POST. If formatting has been specified for this field, it
|
|
will be applied here.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_validator">validator()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Get / set the 'validator' of the field.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_xss">xss()</a>
|
|
<span>
|
|
: <a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a> </span>
|
|
</dt>
|
|
<dd>Set a formatting method that will be used for XSS checking / removal.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a href="classes/DataTables-Editor-Field.html#method_xssSafety">xssSafety()</a>
|
|
<span>
|
|
: string </span>
|
|
</dt>
|
|
<dd>Perform XSS prevention on an input.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
|
|
<a href="classes/DataTables-Ext.html#method__getSet">_getSet()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Common getter / setter function for DataTables classes.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
|
|
<a href="classes/DataTables-Ext.html#method__propExists">_propExists()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Determine if a property is available in a data set (allowing `null` to be
|
|
a valid value)</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
|
|
<a href="classes/DataTables-Ext.html#method__readProp">_readProp()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Read a value from a data structure, using Javascript dotted object
|
|
notation. This is the inverse of the `_writeProp` method and provides
|
|
the same support, matching DataTables' ability to read nested JSON
|
|
data objects.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
|
|
<a href="classes/DataTables-Ext.html#method__writeProp">_writeProp()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Write the field's value to an array structure, using Javascript dotted
|
|
object notation to indicate JSON data structure. For example `name.first`
|
|
gives the data structure: `name: { first: ... }`. This matches DataTables
|
|
own ability to do this on the client-side, although this doesn't
|
|
implement implement quite such a complex structure (no array / function
|
|
support).</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<section class="phpdocumentor-constants">
|
|
<h3 class="phpdocumentor-elements__header" id="constants">
|
|
Constants
|
|
<a href="classes/DataTables-Editor-Field.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h3>
|
|
<article class="phpdocumentor-element -constant -public ">
|
|
<h4 class="phpdocumentor-element__name" id="constant_SET_BOTH">
|
|
SET_BOTH
|
|
<a href="classes/DataTables-Editor-Field.html#constant_SET_BOTH" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">74</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.74" class="phpdocumentor-element-found-in__source" data-line="74" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Set option flag (`set()`) - write to database on both create and edit</p>
|
|
|
|
<code class="phpdocumentor-signature phpdocumentor-code ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__type">mixed</span>
|
|
<span class="phpdocumentor-signature__name">SET_BOTH</span>
|
|
= <span class="phpdocumentor-signature__default-value">'both'</span>
|
|
</code>
|
|
|
|
|
|
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
|
|
|
|
</article>
|
|
<article class="phpdocumentor-element -constant -public ">
|
|
<h4 class="phpdocumentor-element__name" id="constant_SET_CREATE">
|
|
SET_CREATE
|
|
<a href="classes/DataTables-Editor-Field.html#constant_SET_CREATE" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">77</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.77" class="phpdocumentor-element-found-in__source" data-line="77" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Set option flag (`set()`) - write to database only on create</p>
|
|
|
|
<code class="phpdocumentor-signature phpdocumentor-code ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__type">mixed</span>
|
|
<span class="phpdocumentor-signature__name">SET_CREATE</span>
|
|
= <span class="phpdocumentor-signature__default-value">'create'</span>
|
|
</code>
|
|
|
|
|
|
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
|
|
|
|
</article>
|
|
<article class="phpdocumentor-element -constant -public ">
|
|
<h4 class="phpdocumentor-element__name" id="constant_SET_EDIT">
|
|
SET_EDIT
|
|
<a href="classes/DataTables-Editor-Field.html#constant_SET_EDIT" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">80</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.80" class="phpdocumentor-element-found-in__source" data-line="80" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Set option flag (`set()`) - write to database only on edit</p>
|
|
|
|
<code class="phpdocumentor-signature phpdocumentor-code ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__type">mixed</span>
|
|
<span class="phpdocumentor-signature__name">SET_EDIT</span>
|
|
= <span class="phpdocumentor-signature__default-value">'edit'</span>
|
|
</code>
|
|
|
|
|
|
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
|
|
|
|
</article>
|
|
<article class="phpdocumentor-element -constant -public ">
|
|
<h4 class="phpdocumentor-element__name" id="constant_SET_NONE">
|
|
SET_NONE
|
|
<a href="classes/DataTables-Editor-Field.html#constant_SET_NONE" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">71</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.71" class="phpdocumentor-element-found-in__source" data-line="71" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Set option flag (`set()`) - do not set data</p>
|
|
|
|
<code class="phpdocumentor-signature phpdocumentor-code ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__type">mixed</span>
|
|
<span class="phpdocumentor-signature__name">SET_NONE</span>
|
|
= <span class="phpdocumentor-signature__default-value">'none'</span>
|
|
</code>
|
|
|
|
|
|
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
|
|
|
|
</article>
|
|
</section>
|
|
|
|
|
|
|
|
<section class="phpdocumentor-methods">
|
|
<h3 class="phpdocumentor-elements__header" id="methods">
|
|
Methods
|
|
<a href="classes/DataTables-Editor-Field.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h3>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method___construct">
|
|
__construct()
|
|
<a href="classes/DataTables-Editor-Field.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">94</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.94" class="phpdocumentor-element-found-in__source" data-line="94" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Field instance constructor.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$dbField</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$name</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>@param string $dbField Name of the database column</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$dbField</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$name</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Name to use in the JSON output from Editor and the
|
|
HTTP submit from the client-side when editing. If not given then the
|
|
$dbField name is used.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_apply">
|
|
apply()
|
|
<a href="classes/DataTables-Editor-Field.html#method_apply" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">587</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.587" class="phpdocumentor-element-found-in__source" data-line="587" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Check to see if a field should be used for a particular action (get or set).</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">apply</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$action</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$data</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>Called by the Editor / Join class instances - not expected for general
|
|
consumption - internal.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$action</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Direction that the data is travelling - 'get' is
|
|
reading DB data, <code class="prettyprint">create</code> and <code class="prettyprint">edit</code> for writing to the DB
|
|
@param array $data Data submitted from the client-side when setting.
|
|
@return boolean true if the field should be used in the get / set.
|
|
@internal</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$data</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_dbField">
|
|
dbField()
|
|
<a href="classes/DataTables-Editor-Field.html#method_dbField" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">199</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.199" class="phpdocumentor-element-found-in__source" data-line="199" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set the DB field name.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">dbField</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>Note that when used as a setter, an alias can be given for the field
|
|
using the SQL <code class="prettyprint">as</code> keyword - for example: <code class="prettyprint">firstName as name</code>. In this
|
|
situation the dbField is set to the field name before the <code class="prettyprint">as</code>, and the
|
|
field's name (<code class="prettyprint">name()</code>) is set to the name after the <code class="prettyprint">as</code>.</p>
|
|
<p>As a result of this, the following constructs have identical
|
|
functionality:</p>
|
|
<p>Field::inst( 'firstName as name' );
|
|
Field::inst( 'firstName', 'name' );</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set if using as a setter.
|
|
@return string|self The name of the db field if no parameter is given,
|
|
or self if used as a setter.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_get">
|
|
get()
|
|
<a href="classes/DataTables-Editor-Field.html#method_get" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">228</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.228" class="phpdocumentor-element-found-in__source" data-line="228" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set the 'get' property of the field.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">get</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>A field can be marked as write only when setting the get property to false
|
|
here.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set if using as a setter.
|
|
@return boolean|self The get property if no parameter is given, or self
|
|
if used as a setter.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_getFormatter">
|
|
getFormatter()
|
|
<a href="classes/DataTables-Editor-Field.html#method_getFormatter" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">254</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.254" class="phpdocumentor-element-found-in__source" data-line="254" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get formatter for the field's data.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">getFormatter</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">callable|string </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$opts</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>When the data has been retrieved from the server, it can be passed through
|
|
a formatter here, which will manipulate (format) the data as required. This
|
|
can be useful when, for example, working with dates and a particular format
|
|
is required on the client-side.</p>
|
|
<p>Editor has a number of formatters available with the <a href="classes/DataTables-Editor-Format.html"><abbr title="\DataTables\Editor\Format">Format</abbr></a> class
|
|
which can be used directly with this method.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">callable|string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set if using as a setter. Can be given as
|
|
a closure function or a string with a reference to a function that will
|
|
be called with call_user_func().
|
|
@param mixed $opts Variable that is passed through to the get formatting
|
|
function - can be useful for passing through extra information such as
|
|
date formatting string, or a required flag. The actual options available
|
|
depend upon the formatter used.
|
|
@return callable|string|self The get formatter if no parameter is given, or
|
|
self if used as a setter.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$opts</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_getValue">
|
|
getValue()
|
|
<a href="classes/DataTables-Editor-Field.html#method_getValue" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">272</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.272" class="phpdocumentor-element-found-in__source" data-line="272" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set a get value. If given, then this value is used to send to the
|
|
client-side, regardless of what value is held by the database.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">getValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">callable|string|<abbr title="\DataTables\Editor\number">number</abbr> </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">callable|string|self</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">callable|string|<abbr title="\DataTables\Editor\number">number</abbr></span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set, or no value to use as a
|
|
getter</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">callable|string|self</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Value if used as a getter, or self if used
|
|
as a setter.</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
-static "
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_inst">
|
|
inst()
|
|
<a href="classes/DataTables-Ext.html#method_inst" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Ext.php"><a href="files/ext.html"><abbr title="Ext.php">Ext.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">51</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.51" class="phpdocumentor-element-found-in__source" data-line="51" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Static method to instantiate a new instance of a class (shorthand of
|
|
'instantiate').</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">inst</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a>|<a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a>|<a href="classes/DataTables-Editor-Join.html"><abbr title="\DataTables\Editor\Join">Join</abbr></a>|<a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a></span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This method performs exactly the same actions as the 'instantiate'
|
|
static method, but is simply shorter and easier to type!</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a>|<a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a>|<a href="classes/DataTables-Editor-Join.html"><abbr title="\DataTables\Editor\Join">Join</abbr></a>|<a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a></span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>class
|
|
@static</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
-static "
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_instantiate">
|
|
instantiate()
|
|
<a href="classes/DataTables-Ext.html#method_instantiate" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Ext.php"><a href="files/ext.html"><abbr title="Ext.php">Ext.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">32</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.32" class="phpdocumentor-element-found-in__source" data-line="32" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Static method to instantiate a new instance of a class.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">instantiate</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a>|<a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a>|<a href="classes/DataTables-Editor-Join.html"><abbr title="\DataTables\Editor\Join">Join</abbr></a>|<a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a></span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>A factory method that will create a new instance of the class
|
|
that has extended 'Ext'. This allows classes to be instantiated
|
|
and then chained - which otherwise isn't available until PHP 5.4.
|
|
If using PHP 5.4 or later, simply create a 'new' instance of the
|
|
target class and chain methods as normal.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a>|<a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a>|<a href="classes/DataTables-Editor-Join.html"><abbr title="\DataTables\Editor\Join">Join</abbr></a>|<a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a></span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Instantiated class
|
|
@static</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_name">
|
|
name()
|
|
<a href="classes/DataTables-Editor-Field.html#method_name" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">289</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.289" class="phpdocumentor-element-found-in__source" data-line="289" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set the 'name' property of the field.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">name</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>The name is typically the same as the dbField name, since it makes things
|
|
less confusing(!), but it is possible to set a different name for the data
|
|
which is used in the JSON returned to DataTables in a 'get' operation and
|
|
the field name used in a 'set' operation.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set if using as a setter.
|
|
@return string|self The name property if no parameter is given, or self
|
|
if used as a setter.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_options">
|
|
options()
|
|
<a href="classes/DataTables-Editor-Field.html#method_options" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">315</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.315" class="phpdocumentor-element-found-in__source" data-line="315" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get a list of values that can be used for the options list in radio,
|
|
select and checkbox inputs from the database for this field.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">options</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string|callable </span><span class="phpdocumentor-signature__argument__name">$table</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$value</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$label</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">callable </span><span class="phpdocumentor-signature__argument__name">$condition</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">callable </span><span class="phpdocumentor-signature__argument__name">$format</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$order</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a></span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>Note that this is for simple 'label / value' pairs only. For more complex
|
|
data, including pairs that require joins and where conditions, use a
|
|
closure to provide a query</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$table</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|callable</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Database table name to use to get the
|
|
paired data from, or a closure function if providing a method</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$value</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table column name that contains the pair's
|
|
value. Not used if the first parameter is given as a closure</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$label</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Table column name that contains the pair's
|
|
label. Not used if the first parameter is given as a closure</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$condition</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">callable</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Function that will add <code class="prettyprint">where</code>
|
|
conditions to the query</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$format</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">callable</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Function will render each label</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$order</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>SQL ordering</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a></span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Self for chaining</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_searchBuilderOptions">
|
|
searchBuilderOptions()
|
|
<a href="classes/DataTables-Editor-Field.html#method_searchBuilderOptions" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">388</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.388" class="phpdocumentor-element-found-in__source" data-line="388" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get a list of values that can be used for the options list in SearchBuilder</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">searchBuilderOptions</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/DataTables-Editor-SearchBuilderOptions.html"><abbr title="\DataTables\Editor\SearchBuilderOptions">SearchBuilderOptions</abbr></a>|callable </span><span class="phpdocumentor-signature__argument__name">$sbInput</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$sbInput</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/DataTables-Editor-SearchBuilderOptions.html"><abbr title="\DataTables\Editor\SearchBuilderOptions">SearchBuilderOptions</abbr></a>|callable</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>SearchBuilderOptions instance or a closure function if providing a method</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">self</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_searchPaneOptions">
|
|
searchPaneOptions()
|
|
<a href="classes/DataTables-Editor-Field.html#method_searchPaneOptions" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">361</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.361" class="phpdocumentor-element-found-in__source" data-line="361" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get a list of values that can be used for the options list in SearchPanes</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">searchPaneOptions</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/DataTables-Editor-SearchPaneOptions.html"><abbr title="\DataTables\Editor\SearchPaneOptions">SearchPaneOptions</abbr></a>|callable </span><span class="phpdocumentor-signature__argument__name">$spInput</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$spInput</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/DataTables-Editor-SearchPaneOptions.html"><abbr title="\DataTables\Editor\SearchPaneOptions">SearchPaneOptions</abbr></a>|callable</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>SearchPaneOptions instance or a closure function if providing a method</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">self</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_set">
|
|
set()
|
|
<a href="classes/DataTables-Editor-Field.html#method_set" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">431</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.431" class="phpdocumentor-element-found-in__source" data-line="431" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set the 'set' property of the field.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">set</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string|bool </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>A field can be marked as read only using this option, to be set only
|
|
during an create or edit action or to be set during both actions. This
|
|
provides the ability to have fields that are only set when a new row is
|
|
created (for example a "created" time stamp).</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string|bool</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set when the method is being used as a
|
|
setter (leave as undefined to use as a getter). This can take the
|
|
value of:</p>
|
|
<ul>
|
|
<li>
|
|
<code class="prettyprint">true</code> - Same as <code class="prettyprint">Field::SET_BOTH</code>
|
|
</li>
|
|
<li>
|
|
<code class="prettyprint">false</code> - Same as <code class="prettyprint">Field::SET_NONE</code>
|
|
</li>
|
|
<li>
|
|
<code class="prettyprint">Field::SET_BOTH</code> - Set the database value on both create and edit commands</li>
|
|
<li>
|
|
<code class="prettyprint">Field::SET_NONE</code> - Never set the database value</li>
|
|
<li>
|
|
<code class="prettyprint">Field::SET_CREATE</code> - Set the database value only on create</li>
|
|
<li>
|
|
<code class="prettyprint">Field::SET_EDIT</code> - Set the database value only on edit
|
|
@return string|self The set property if no parameter is given, or self
|
|
if used as a setter.</li>
|
|
</ul>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_setFormatter">
|
|
setFormatter()
|
|
<a href="classes/DataTables-Editor-Field.html#method_setFormatter" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">464</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.464" class="phpdocumentor-element-found-in__source" data-line="464" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Set formatter for the field's data.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">setFormatter</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">callable|string </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$opts</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>When the data has been retrieved from the server, it can be passed through
|
|
a formatter here, which will manipulate (format) the data as required. This
|
|
can be useful when, for example, working with dates and a particular format
|
|
is required on the client-side.</p>
|
|
<p>Editor has a number of formatters available with the <a href="classes/DataTables-Editor-Format.html"><abbr title="\DataTables\Editor\Format">Format</abbr></a> class
|
|
which can be used directly with this method.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">callable|string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set if using as a setter. Can be given as
|
|
a closure function or a string with a reference to a function that will
|
|
be called with call_user_func().
|
|
@param mixed $opts Variable that is passed through to the get formatting
|
|
function - can be useful for passing through extra information such as
|
|
date formatting string, or a required flag. The actual options available
|
|
depend upon the formatter used.
|
|
@return callable|string|self The set formatter if no parameter is given, or
|
|
self if used as a setter.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$opts</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_setValue">
|
|
setValue()
|
|
<a href="classes/DataTables-Editor-Field.html#method_setValue" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">482</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.482" class="phpdocumentor-element-found-in__source" data-line="482" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set a set value. If given, then this value is used to write to the
|
|
database regardless of what data is sent from the client-side.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">setValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">callable|string|<abbr title="\DataTables\Editor\number">number</abbr> </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">callable|string|self</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">callable|string|<abbr title="\DataTables\Editor\number">number</abbr></span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set, or no value to use as a
|
|
getter</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">callable|string|self</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Value if used as a getter, or self if used
|
|
as a setter.</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_upload">
|
|
upload()
|
|
<a href="classes/DataTables-Editor-Field.html#method_upload" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">494</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.494" class="phpdocumentor-element-found-in__source" data-line="494" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set the upload class for this field.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">upload</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a>|self</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a></span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Upload class if used as a setter</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor-Upload.html"><abbr title="\DataTables\Editor\Upload">Upload</abbr></a>|self</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Value if used as a getter, or self if used
|
|
as a setter.</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_val">
|
|
val()
|
|
<a href="classes/DataTables-Editor-Field.html#method_val" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">708</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.708" class="phpdocumentor-element-found-in__source" data-line="708" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get the value of the field, taking into account if it is coming from the
|
|
DB or from a POST. If formatting has been specified for this field, it
|
|
will be applied here.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">val</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$direction</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$data</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>Called by the Editor / Join class instances - not expected for general
|
|
consumption - internal.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$direction</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Direction that the data is travelling - 'get' is
|
|
reading data, and 'set' is writing it to the DB.
|
|
@param array $data Data submitted from the client-side when setting or the
|
|
data for the row when getting data from the DB.
|
|
@return string Value for the field
|
|
@internal</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$data</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_validator">
|
|
validator()
|
|
<a href="classes/DataTables-Editor-Field.html#method_validator" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">522</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.522" class="phpdocumentor-element-found-in__source" data-line="522" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Get / set the 'validator' of the field.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">validator</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">callable|string </span><span class="phpdocumentor-signature__argument__name">$_</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$opts</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>The validator can be used to check if any abstract piece of data is valid
|
|
or not according to the given rules of the validation function used.</p>
|
|
<p>Multiple validation options can be applied to a field instance by calling
|
|
this method multiple times. For example, it would be possible to have a
|
|
'required' validation and a 'maxLength' validation with multiple calls.</p>
|
|
<p>Editor has a number of validation available with the <a href="classes/DataTables-Editor-Validate.html"><abbr title="\DataTables\Editor\Validate">Validate</abbr></a> class
|
|
which can be used directly with this method.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$_</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">callable|string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to set if using as the validation method.
|
|
Can be given as a closure function or a string with a reference to a
|
|
function that will be called with call_user_func().
|
|
@param mixed $opts Variable that is passed through to the validation
|
|
function - can be useful for passing through extra information such as
|
|
date formatting string, or a required flag. The actual options available
|
|
depend upon the validation function used.
|
|
@return callable|string|self The validation method if no parameter is given,
|
|
or self if used as a setter.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$opts</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_xss">
|
|
xss()
|
|
<a href="classes/DataTables-Editor-Field.html#method_xss" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">557</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.557" class="phpdocumentor-element-found-in__source" data-line="557" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Set a formatting method that will be used for XSS checking / removal.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">xss</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">callable|false </span><span class="phpdocumentor-signature__argument__name">$xssFormatter</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a></span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This should be a function that takes a single argument (the value to be
|
|
cleaned) and returns the cleaned value.</p>
|
|
<p>Editor will use HtmLawed by default for this operation, which is built
|
|
into the software and no additional configuration is required, but a
|
|
custom function can be used if you wish to use a different formatter such
|
|
as HTMLPurifier.</p>
|
|
<p>If you wish to disable this option (which you would only do if you are
|
|
absolutely confident that your validation will pick up on any XSS inputs)
|
|
simply provide a closure function that returns the value given to the
|
|
function. This is <em>not</em> recommended.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$xssFormatter</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">callable|false</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>XSS cleaner function, use <code class="prettyprint">false</code> or
|
|
<code class="prettyprint">null</code> to disable XSS cleaning.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type"><a href="classes/DataTables-Editor-Field.html"><abbr title="\DataTables\Editor\Field">Field</abbr></a></span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Self for chaining.</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_xssSafety">
|
|
xssSafety()
|
|
<a href="classes/DataTables-Editor-Field.html#method_xssSafety" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Editor/Field.php"><a href="files/editor-field.html"><abbr title="Editor/Field.php">Field.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">845</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.845" class="phpdocumentor-element-found-in__source" data-line="845" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Perform XSS prevention on an input.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">xssSafety</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$val</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$val</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to be escaped</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">string</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Safe value</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method__getSet">
|
|
_getSet()
|
|
<a href="classes/DataTables-Ext.html#method__getSet" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Ext.php"><a href="files/ext.html"><abbr title="Ext.php">Ext.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">75</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.75" class="phpdocumentor-element-found-in__source" data-line="75" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Common getter / setter function for DataTables classes.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__name">_getSet</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__reference-operator">&</span><span class="phpdocumentor-signature__argument__name">$prop</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$val</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$array</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">false</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<section class="phpdocumentor-description"><p>This getter / setter method makes building getter / setting methods
|
|
easier, by abstracting everything to a single function call.</p>
|
|
</section>
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$prop</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>The property to set
|
|
@param mixed $val The value to set - if given as null, then we assume
|
|
that the function is being used as a getter.
|
|
@param boolean $array Treat the target property as an array or not
|
|
(default false). If used as an array, then values passed in are added
|
|
to the $prop array.
|
|
@return self|mixed Class instance if setting (allowing chaining), or
|
|
the value requested if getting.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$val</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$array</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">false</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"></section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method__propExists">
|
|
_propExists()
|
|
<a href="classes/DataTables-Ext.html#method__propExists" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Ext.php"><a href="files/ext.html"><abbr title="Ext.php">Ext.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">105</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.105" class="phpdocumentor-element-found-in__source" data-line="105" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Determine if a property is available in a data set (allowing `null` to be
|
|
a valid value)</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__name">_propExists</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$name</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$data</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$name</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Javascript dotted object name to write to</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$data</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Data source array to read from</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h5>
|
|
<dl class="phpdocumentor-tag-list">
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">private</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>true if present, false otherwise</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method__readProp">
|
|
_readProp()
|
|
<a href="classes/DataTables-Ext.html#method__readProp" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Ext.php"><a href="files/ext.html"><abbr title="Ext.php">Ext.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">142</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.142" class="phpdocumentor-element-found-in__source" data-line="142" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Read a value from a data structure, using Javascript dotted object
|
|
notation. This is the inverse of the `_writeProp` method and provides
|
|
the same support, matching DataTables' ability to read nested JSON
|
|
data objects.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__name">_readProp</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$name</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$data</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$name</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Javascript dotted object name to write to</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$data</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Data source array to read from</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h5>
|
|
<dl class="phpdocumentor-tag-list">
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">private</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>The read value, or null if no value found.</p>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method__writeProp">
|
|
_writeProp()
|
|
<a href="classes/DataTables-Ext.html#method__writeProp" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h4>
|
|
<aside class="phpdocumentor-element-found-in">
|
|
<abbr class="phpdocumentor-element-found-in__file" title="Ext.php"><a href="files/ext.html"><abbr title="Ext.php">Ext.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">186</span>
|
|
|
|
<a href="classes/DataTables-Editor-Field.html#source-view.186" class="phpdocumentor-element-found-in__source" data-line="186" data-modal="source-view"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Write the field's value to an array structure, using Javascript dotted
|
|
object notation to indicate JSON data structure. For example `name.first`
|
|
gives the data structure: `name: { first: ... }`. This matches DataTables
|
|
own ability to do this on the client-side, although this doesn't
|
|
implement implement quite such a complex structure (no array / function
|
|
support).</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__name">_writeProp</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__reference-operator">&</span><span class="phpdocumentor-signature__argument__name">$out</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$name</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$value</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
|
|
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
|
<dl class="phpdocumentor-argument-list">
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$out</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Array to write the data to</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$name</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Javascript dotted object name to write to</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$value</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Value to write</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
|
</h5>
|
|
<dl class="phpdocumentor-tag-list">
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">throws</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><abbr title="\Exception">Exception</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Information about duplicate properties</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">private</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
|
|
|
|
</article>
|
|
</section>
|
|
|
|
<div class="phpdocumentor-modal" id="source-view">
|
|
<div class="phpdocumentor-modal-bg" data-exit-button></div>
|
|
<div class="phpdocumentor-modal-container">
|
|
<div class="phpdocumentor-modal-content">
|
|
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/Editor/Field.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
|
|
</div>
|
|
<button data-exit-button class="phpdocumentor-modal__close">X</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
function loadExternalCodeSnippets(line) {
|
|
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
|
|
var src = pre.getAttribute('data-src').replace( /\\/g, '/');
|
|
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
|
|
var language = 'php';
|
|
|
|
var code = document.createElement('code');
|
|
code.className = 'language-' + language;
|
|
|
|
pre.textContent = '';
|
|
|
|
pre.setAttribute('data-line', line)
|
|
code.textContent = 'Loading…';
|
|
|
|
pre.appendChild(code);
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
xhr.open('GET', src, true);
|
|
|
|
xhr.onreadystatechange = function () {
|
|
if (xhr.readyState == 4) {
|
|
|
|
if (xhr.status < 400 && xhr.responseText) {
|
|
code.textContent = xhr.responseText;
|
|
|
|
Prism.highlightElement(code);
|
|
}
|
|
else if (xhr.status >= 400) {
|
|
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
|
}
|
|
else {
|
|
code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
|
|
}
|
|
}
|
|
};
|
|
|
|
xhr.send(null);
|
|
});
|
|
}
|
|
|
|
var modals = document.querySelectorAll("[data-modal]");
|
|
|
|
modals.forEach(function (trigger) {
|
|
trigger.addEventListener("click", function (event) {
|
|
//event.preventDefault();
|
|
const modal = document.getElementById(trigger.dataset.modal);
|
|
modal.classList.add("phpdocumentor-modal__open");
|
|
loadExternalCodeSnippets(trigger.dataset.line)
|
|
const exits = modal.querySelectorAll("[data-exit-button]");
|
|
exits.forEach(function (exit) {
|
|
exit.addEventListener("click", function (event) {
|
|
event.preventDefault();
|
|
modal.classList.remove("phpdocumentor-modal__open");
|
|
});
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</article>
|
|
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
|
|
<section class="phpdocumentor-search-results__dialog">
|
|
<header class="phpdocumentor-search-results__header">
|
|
<h2 class="phpdocumentor-search-results__title">Search results</h2>
|
|
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
|
|
</header>
|
|
<section class="phpdocumentor-search-results__body">
|
|
<ul class="phpdocumentor-search-results__entries"></ul>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
<a href="classes/DataTables-Editor-Field.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
|
|
|
|
</main>
|
|
|
|
<script>
|
|
cssVars({});
|
|
</script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
|
|
</body>
|
|
</html>
|