Files
safekat/ci4/app/ThirdParty/DatatablesEditor/docs/classes/DataTables-Editor.html
2023-06-12 14:27:57 +02:00

2990 lines
157 KiB
HTML

<!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>
</ul>
<article class="phpdocumentor-element -class">
<h2 class="phpdocumentor-content__title">
Editor
<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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">61</span>
<a href="classes/DataTables-Editor.html#source-view.61" class="phpdocumentor-element-found-in__source" data-line="61" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">DataTables Editor base class for creating editable tables.</p>
<section class="phpdocumentor-description"><p>Editor class instances are capable of servicing all of the requests that
DataTables and Editor will make from the client-side - specifically:</p>
<ul>
<li>Get data</li>
<li>Create new record</li>
<li>Edit existing record</li>
<li>Delete existing records</li>
</ul>
<p>The Editor instance is configured with information regarding the
database table fields that you wish to make editable, and other information
needed to read and write to the database (table name for example!).</p>
<p>This documentation is very much focused on describing the API presented
by these DataTables Editor classes. For a more general overview of how
the Editor class is used, and how to install Editor on your server, please
refer to the <a href="https://editor.datatables.net/manual">Editor manual</a>.</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>A very basic example of using Editor to create a table with four fields.
This is all that is needed on the server-side to create a editable
table - the Editor-&gt;process() method determines what action DataTables /
Editor is requesting from the server-side and will correctly action it.</p>
<pre class="prettyprint"><code class="language-php"> Editor::inst( $db, 'browsers' )
-&gt;fields(
Field::inst( 'first_name' )-&gt;validator( Validate::required() ),
Field::inst( 'last_name' )-&gt;validator( Validate::required() ),
Field::inst( 'country' ),
Field::inst( 'details' )
)
-&gt;process( $_POST )
-&gt;json();
</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.html#constant_ACTION_CREATE">ACTION_CREATE</a>
<span>
&nbsp;= &#039;create&#039; </span>
</dt>
<dd>Request type - create</dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/DataTables-Editor.html#constant_ACTION_DELETE">ACTION_DELETE</a>
<span>
&nbsp;= &#039;remove&#039; </span>
</dt>
<dd>Request type - delete</dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/DataTables-Editor.html#constant_ACTION_EDIT">ACTION_EDIT</a>
<span>
&nbsp;= &#039;edit&#039; </span>
</dt>
<dd>Request type - edit</dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/DataTables-Editor.html#constant_ACTION_READ">ACTION_READ</a>
<span>
&nbsp;= &#039;read&#039; </span>
</dt>
<dd>Request type - read</dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/DataTables-Editor.html#constant_ACTION_UPLOAD">ACTION_UPLOAD</a>
<span>
&nbsp;= &#039;upload&#039; </span>
</dt>
<dd>Request type - upload</dd>
<dt class="phpdocumentor-table-of-contents__entry -property -public">
<a href="classes/DataTables-Editor.html#property_version">$version</a>
<span>
&nbsp;: string </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method___construct">__construct()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Constructor.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method__ssp_field">_ssp_field()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Convert a column index to a database field name - used for server-side
processing requests.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_action">action()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Determine the request type from an HTTP request.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_actionName">actionName()</a>
<span>
&nbsp;: string|self </span>
</dt>
<dd>Get / set the action name to read in HTTP parameters. This can be useful
to set if you are using a framework that uses the default name of `action`
for something else (e.g. WordPress).</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_data">data()</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt; </span>
</dt>
<dd>Get the data constructed in this instance.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_db">db()</a>
<span>
&nbsp;: <a href="classes/DataTables-Database.html"><abbr title="\DataTables\Database">Database</abbr></a>|self </span>
</dt>
<dd>Get / set the DB connection instance</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_debug">debug()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get / set debug mode and set a debug message.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_field">field()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get / set field instance.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_fields">fields()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get / set field instances.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_idPrefix">idPrefix()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get / set the DOM prefix.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_inData">inData()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get the data that is being processed by the Editor instance. This is only
useful once the `process()` method has been called, and is available for
use in validation and formatter methods.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Ext.html#method_inst">inst()</a>
<span>
&nbsp;: <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
&#039;instantiate&#039;).</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Ext.html#method_instantiate">instantiate()</a>
<span>
&nbsp;: <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.html#method_join">join()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get / set join instances. Note that for the majority of use cases you
will want to use the `leftJoin()` method. It is significantly easier
to use if you are just doing a simple left join!</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_json">json()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get the JSON for the data constructed in this instance.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_jsonp">jsonp()</a>
<span>
&nbsp;: self </span>
</dt>
<dd>Echo out JSONP for the data constructed and processed in this instance.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_leftJoin">leftJoin()</a>
<span>
&nbsp;: self </span>
</dt>
<dd>Add a left join condition to the Editor instance, allowing it to operate
over multiple tables. Multiple `leftJoin()` calls can be made for a
single Editor instance to join multiple tables.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_leftJoinRemove">leftJoinRemove()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Indicate if a remove should be performed on left joined tables when deleting
from the parent row. Note that this is disabled by default and will be
removed completely in v2. Use `ON DELETE CASCADE` in your database instead.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_on">on()</a>
<span>
&nbsp;: self </span>
</dt>
<dd>Add an event listener. The `Editor` class will trigger an number of
events that some action can be taken on.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_pkey">pkey()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get / set the primary key.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_pkeyToArray">pkeyToArray()</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt; </span>
</dt>
<dd>Convert a primary key combined value to an array of field values.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_pkeyToValue">pkeyToValue()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Convert a primary key array of field values to a combined value.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_process">process()</a>
<span>
&nbsp;: self </span>
</dt>
<dd>Process a request from the Editor client-side to get / set data.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_readTable">readTable()</a>
<span>
&nbsp;: array&lt;string|int, string&gt;|self </span>
</dt>
<dd>The CRUD read table name. If this method is used, Editor will create from the
table name(s) given rather than those given by `Editor-&gt;table()`. This can be
a useful distinction to allow a read from a VIEW (which could make use of a
complex SELECT) while writing to a different table.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_table">table()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get / set the table name.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_transaction">transaction()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Get / set transaction support.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_tryCatch">tryCatch()</a>
<span>
&nbsp;: bool|<a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a> </span>
</dt>
<dd>Enable / try catch when `process()` is called. Disabling this can be
useful for debugging, but is not recommended for production.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_validate">validate()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Perform validation on a data set.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_validator">validator()</a>
<span>
&nbsp;: <a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a>|callable </span>
</dt>
<dd>Get / set a global validator that will be triggered for the create, edit
and remove actions performed from the client-side. Multiple validators
can be added.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_where">where()</a>
<span>
&nbsp;: array&lt;string|int, string&gt;|self </span>
</dt>
<dd>Where condition to add to the query used to get data from the database.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_whereSet">whereSet()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Get / set if the WHERE conditions should be included in the create and
edit actions.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/DataTables-Editor.html#method_write">write()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/DataTables-Ext.html#method__getSet">_getSet()</a>
<span>
&nbsp;: 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>
&nbsp;: 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>
&nbsp;: 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&#039; 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>
&nbsp;: mixed </span>
</dt>
<dd>Write the field&#039;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&#039;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.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_ACTION_CREATE">
ACTION_CREATE
<a href="classes/DataTables-Editor.html#constant_ACTION_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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">70</span>
<a href="classes/DataTables-Editor.html#source-view.70" class="phpdocumentor-element-found-in__source" data-line="70" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Request type - 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">ACTION_CREATE</span>
= <span class="phpdocumentor-signature__default-value">&#039;create&#039;</span>
</code>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_ACTION_DELETE">
ACTION_DELETE
<a href="classes/DataTables-Editor.html#constant_ACTION_DELETE" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">76</span>
<a href="classes/DataTables-Editor.html#source-view.76" class="phpdocumentor-element-found-in__source" data-line="76" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Request type - delete</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">ACTION_DELETE</span>
= <span class="phpdocumentor-signature__default-value">&#039;remove&#039;</span>
</code>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_ACTION_EDIT">
ACTION_EDIT
<a href="classes/DataTables-Editor.html#constant_ACTION_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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">73</span>
<a href="classes/DataTables-Editor.html#source-view.73" class="phpdocumentor-element-found-in__source" data-line="73" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Request type - 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">ACTION_EDIT</span>
= <span class="phpdocumentor-signature__default-value">&#039;edit&#039;</span>
</code>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_ACTION_READ">
ACTION_READ
<a href="classes/DataTables-Editor.html#constant_ACTION_READ" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">67</span>
<a href="classes/DataTables-Editor.html#source-view.67" class="phpdocumentor-element-found-in__source" data-line="67" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Request type - read</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">ACTION_READ</span>
= <span class="phpdocumentor-signature__default-value">&#039;read&#039;</span>
</code>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_ACTION_UPLOAD">
ACTION_UPLOAD
<a href="classes/DataTables-Editor.html#constant_ACTION_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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">79</span>
<a href="classes/DataTables-Editor.html#source-view.79" class="phpdocumentor-element-found-in__source" data-line="79" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Request type - upload</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">ACTION_UPLOAD</span>
= <span class="phpdocumentor-signature__default-value">&#039;upload&#039;</span>
</code>
<section class="phpdocumentor-description"></section>
</article>
</section>
<section class="phpdocumentor-properties">
<h3 class="phpdocumentor-elements__header" id="properties">
Properties
<a href="classes/DataTables-Editor.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="
phpdocumentor-element
-property
-public
"
>
<h4 class="phpdocumentor-element__name" id="property_version">
$version
<a href="classes/DataTables-Editor.html#property_version" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="Editor.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">145</span>
<a href="classes/DataTables-Editor.html#source-view.145" class="phpdocumentor-element-found-in__source" data-line="145" data-modal="source-view"></a>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">string</span>
<span class="phpdocumentor-signature__name">$version</span>
= <span class="phpdocumentor-signature__default-value">&#039;2.1.3&#039;</span></code>
</article>
</section>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/DataTables-Editor.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.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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">130</span>
<a href="classes/DataTables-Editor.html#source-view.130" class="phpdocumentor-element-found-in__source" data-line="130" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">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&nbsp;</span><span class="phpdocumentor-signature__argument__name">$db</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|array&lt;string|int, mixed&gt;&nbsp;</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">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$pkey</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 Database $db An instance of the DataTables Database class that we can
use for the DB connection. Can be given here or with the 'db' 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">$db</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">$table</span>
: <span class="phpdocumentor-signature__argument__return-type">string|array&lt;string|int, mixed&gt;</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The table name in the database to read and write
information from and to. Can be given here or with the 'table' method.
@param string|array $pkey Primary key column name in the table given in
the $table parameter. Can be given here or with the 'pkey' method.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$pkey</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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method__ssp_field">
_ssp_field()
<a href="classes/DataTables-Editor.html#method__ssp_field" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1662</span>
<a href="classes/DataTables-Editor.html#source-view.1662" class="phpdocumentor-element-found-in__source" data-line="1662" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Convert a column index to a database field name - used for server-side
processing requests.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">_ssp_field</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$http</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$index</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<section class="phpdocumentor-description"><p>@param array $http HTTP variables (i.e. GET or POST)</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">$http</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">$index</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Index in the DataTables' submitted data
@returns string DB field name
@throws \Exception Unknown fields
@private Note that it is actually public for PHP 5.3 - thread 39810</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_action">
action()
<a href="classes/DataTables-Editor.html#method_action" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">92</span>
<a href="classes/DataTables-Editor.html#source-view.92" class="phpdocumentor-element-found-in__source" data-line="92" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Determine the request type from an HTTP request.</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">action</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$http</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$name</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;action&#039;</span><span> ]</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">$http</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Typically $_POST, but can be any array used to carry
an Editor payload</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>
= <span class="phpdocumentor-signature__argument__default-value">&#039;action&#039;</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The parameter name that the action should be read from.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p><code class="prettyprint">Editor::ACTION_READ</code>, <code class="prettyprint">Editor::ACTION_CREATE</code>,
<code class="prettyprint">Editor::ACTION_EDIT</code> or <code class="prettyprint">Editor::ACTION_DELETE</code> indicating the request
type.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_actionName">
actionName()
<a href="classes/DataTables-Editor.html#method_actionName" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">235</span>
<a href="classes/DataTables-Editor.html#source-view.235" class="phpdocumentor-element-found-in__source" data-line="235" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set the action name to read in HTTP parameters. This can be useful
to set if you are using a framework that uses the default name of `action`
for something else (e.g. WordPress).</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">actionName</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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">string|self</span></code>
<section class="phpdocumentor-description"><p>@param string Value to set. If not given, then used as a getter.</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">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">string|self</span>
&mdash;
<section class="phpdocumentor-description"><p>Value, or self if used as a setter.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_data">
data()
<a href="classes/DataTables-Editor.html#method_data" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">249</span>
<a href="classes/DataTables-Editor.html#source-view.249" class="phpdocumentor-element-found-in__source" data-line="249" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get the data constructed in this instance.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">data</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
<section class="phpdocumentor-description"><p>This will get the PHP array of data that has been constructed for the
command that has been processed by this instance. Therefore only useful after
process has been called.</p>
</section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
&mdash;
<section class="phpdocumentor-description"><p>Processed data array.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_db">
db()
<a href="classes/DataTables-Editor.html#method_db" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">262</span>
<a href="classes/DataTables-Editor.html#source-view.262" class="phpdocumentor-element-found-in__source" data-line="262" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set the DB connection instance</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">db</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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-Database.html"><abbr title="\DataTables\Database">Database</abbr></a>|self</span></code>
<section class="phpdocumentor-description"><p>@param Database $_ DataTable's Database class instance to use for database
connectivity. If not given, then used as a getter.</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">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"><a href="classes/DataTables-Database.html"><abbr title="\DataTables\Database">Database</abbr></a>|self</span>
&mdash;
<section class="phpdocumentor-description"><p>The Database connection instance if no parameter
is given, or self if used as a setter.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_debug">
debug()
<a href="classes/DataTables-Editor.html#method_debug" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">287</span>
<a href="classes/DataTables-Editor.html#source-view.287" class="phpdocumentor-element-found-in__source" data-line="287" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set debug mode and set a debug message.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">debug</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">bool|mixed&nbsp;</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&nbsp;</span><span class="phpdocumentor-signature__argument__name">$path</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>It can be useful to see the SQL statements that Editor is using. This
method enables that ability. Information about the queries used is
automatically added to the output data array / JSON under the property
name <code class="prettyprint">debugSql</code>.</p>
<p>This method can also be called with a string parameter, which will be
added to the debug information sent back to the client-side. This can
be useful when debugging event listeners, etc.</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|mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Debug mode state. If not given, then used as a
getter. If given as anything other than a boolean, it will be added
to the debug information sent back to the client.
@param string [$path=null] Set an output path to log debug information
@return boolean|self Debug mode state if no parameter is given, or
self if used as a setter or when adding a debug message.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$path</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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_field">
field()
<a href="classes/DataTables-Editor.html#method_field" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">323</span>
<a href="classes/DataTables-Editor.html#source-view.323" class="phpdocumentor-element-found-in__source" data-line="323" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set field instance.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">field</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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 list of fields designates which columns in the table that Editor will work
with (both get and set).</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">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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_fields">
fields()
<a href="classes/DataTables-Editor.html#method_fields" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">354</span>
<a href="classes/DataTables-Editor.html#source-view.354" class="phpdocumentor-element-found-in__source" data-line="354" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set field instances.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">fields</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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>An alias of <abbr title="\DataTables\field">field</abbr>, for convenience.</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">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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_idPrefix">
idPrefix()
<a href="classes/DataTables-Editor.html#method_idPrefix" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">377</span>
<a href="classes/DataTables-Editor.html#source-view.377" class="phpdocumentor-element-found-in__source" data-line="377" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set the DOM prefix.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">idPrefix</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</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>Typically primary keys are numeric and this is not a valid ID value in an
HTML document - is also increases the likelihood of an ID clash if multiple
tables are used on a single page. As such, a prefix is assigned to the
primary key value for each row, and this is used as the DOM ID, so Editor
can track individual rows.</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>Primary key's name. If not given, then used as a getter.
@return string|self Primary key value 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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_inData">
inData()
<a href="classes/DataTables-Editor.html#method_inData" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">390</span>
<a href="classes/DataTables-Editor.html#source-view.390" class="phpdocumentor-element-found-in__source" data-line="390" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get the data that is being processed by the Editor instance. This is only
useful once the `process()` method has been called, and is available for
use in validation and formatter methods.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">inData</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<section class="phpdocumentor-description"><p>@return array Data given to <code class="prettyprint">process()</code>.</p>
</section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
</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.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
&#039;instantiate&#039;).</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>
&mdash;
<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.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>
&mdash;
<section class="phpdocumentor-description"><p>Instantiated class
@static</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_join">
join()
<a href="classes/DataTables-Editor.html#method_join" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">409</span>
<a href="classes/DataTables-Editor.html#source-view.409" class="phpdocumentor-element-found-in__source" data-line="409" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set join instances. Note that for the majority of use cases you
will want to use the `leftJoin()` method. It is significantly easier
to use if you are just doing a simple left join!</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">join</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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 list of Join instances that Editor will join the parent table to
(i.e. the one that the Editor-&gt;table() and Editor-&gt;fields
methods refer to in this class instance).</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">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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_json">
json()
<a href="classes/DataTables-Editor.html#method_json" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">431</span>
<a href="classes/DataTables-Editor.html#source-view.431" class="phpdocumentor-element-found-in__source" data-line="431" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get the JSON for the data constructed in this instance.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">json</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$print</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">true</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<section class="phpdocumentor-description"><p>Basically the same as the Editor-&gt;data() method, but in this case we echo, or
return the JSON string of the data.</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">$print</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
= <span class="phpdocumentor-signature__argument__default-value">true</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Echo the JSON string out (true, default) or return it
(false).
@param int JSON encode option https://www.php.net/manual/en/json.constants.php
@return string|self self if printing the JSON, or JSON representation of
the processed data if false is given as the first parameter.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$options</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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_jsonp">
jsonp()
<a href="classes/DataTables-Editor.html#method_jsonp" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">461</span>
<a href="classes/DataTables-Editor.html#source-view.461" class="phpdocumentor-element-found-in__source" data-line="461" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Echo out JSONP for the data constructed and processed in this instance.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">jsonp</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$callback</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>
<section class="phpdocumentor-description"><p>This is basically the same as Editor-&gt;json() but wraps the return in a
JSONP callback.</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">$callback</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>The callback function name to use. If not given
or <code class="prettyprint">null</code>, then <code class="prettyprint">$_GET['callback']</code> is used (the jQuery default).</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>JSONP function name validation</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">self</span>
&mdash;
<section class="phpdocumentor-description"><p>Self for chaining.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_leftJoin">
leftJoin()
<a href="classes/DataTables-Editor.html#method_leftJoin" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">532</span>
<a href="classes/DataTables-Editor.html#source-view.532" class="phpdocumentor-element-found-in__source" data-line="532" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Add a left join condition to the Editor instance, allowing it to operate
over multiple tables. Multiple `leftJoin()` calls can be made for a
single Editor instance to join multiple tables.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">leftJoin</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$table</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$field1</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$operator</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&nbsp;</span><span class="phpdocumentor-signature__argument__name">$field2</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>
<section class="phpdocumentor-description"><p>A left join is the most common type of join that is used with Editor
so this method is provided to make its use very easy to configure. Its
parameters are basically the same as writing an SQL left join statement,
but in this case Editor will handle the create, update and remove
requirements of the join for you:</p>
<ul>
<li>Create - On create Editor will insert the data into the primary table
and then into the joined tables - selecting the required data for each
table.</li>
<li>Edit - On edit Editor will update the main table, and then either
update the existing rows in the joined table that match the join and
edit conditions, or insert a new row into the joined table if required.</li>
<li>Remove - On delete Editor will remove the main row and then loop over
each of the joined tables and remove the joined data matching the join
link from the main table.</li>
</ul>
<p>Please note that when using join tables, Editor requires that you fully
qualify each field with the field's table name. SQL can result table
names for ambiguous field names, but for Editor to provide its full CRUD
options, the table name must also be given. For example the field
<code class="prettyprint">first_name</code> in the table <code class="prettyprint">users</code> would be given as <code class="prettyprint">users.first_name</code>.</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</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Table name to do a join onto</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$field1</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Field from the parent table to use as the join link</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$operator</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>Join condition (<code class="prettyprint">=</code>, '&lt;`, etc)</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$field2</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>Field from the child table to use as the join link</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">example</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Simple join:</p>
<pre class="prettyprint"><code class="language-php"> -&gt;field(
Field::inst( 'users.first_name as myField' ),
Field::inst( 'users.last_name' ),
Field::inst( 'users.dept_id' ),
Field::inst( 'dept.name' )
)
-&gt;leftJoin( 'dept', 'users.dept_id', '=', 'dept.id' )
-&gt;process($_POST)
-&gt;json();
```&lt;/code&gt;```
This is basically the same as the following SQL statement:
```sql
SELECT users.first_name, users.last_name, user.dept_id, dept.name
FROM users
LEFT JOIN dept ON users.dept_id = dept.id
</code></pre>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">self</span>
&mdash;
<section class="phpdocumentor-description"><p>Self for chaining.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_leftJoinRemove">
leftJoinRemove()
<a href="classes/DataTables-Editor.html#method_leftJoinRemove" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">555</span>
<a href="classes/DataTables-Editor.html#source-view.555" class="phpdocumentor-element-found-in__source" data-line="555" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Indicate if a remove should be performed on left joined tables when deleting
from the parent row. Note that this is disabled by default and will be
removed completely in v2. Use `ON DELETE CASCADE` in your database instead.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">leftJoinRemove</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</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>@deprecated</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 not given, then used as a getter.
@return boolean|self Value 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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_on">
on()
<a href="classes/DataTables-Editor.html#method_on" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">570</span>
<a href="classes/DataTables-Editor.html#source-view.570" class="phpdocumentor-element-found-in__source" data-line="570" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Add an event listener. The `Editor` class will trigger an number of
events that some action can be taken on.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">on</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$name</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">callable&nbsp;</span><span class="phpdocumentor-signature__argument__name">$callback</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">$name</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Event name</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$callback</span>
: <span class="phpdocumentor-signature__argument__return-type">callable</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Callback function to execute when the event
occurs</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">self</span>
&mdash;
<section class="phpdocumentor-description"><p>Self for chaining.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_pkey">
pkey()
<a href="classes/DataTables-Editor.html#method_pkey" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">594</span>
<a href="classes/DataTables-Editor.html#source-view.594" class="phpdocumentor-element-found-in__source" data-line="594" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set the primary key.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">pkey</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string|array&lt;string|int, mixed&gt;&nbsp;</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 primary key must be known to Editor so it will know which rows are being
edited / deleted upon those actions. The default value is ['id'].</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|array&lt;string|int, mixed&gt;</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Primary key's name. If not given, then used as a
getter. An array of column names can be given to allow composite keys to
be used.
@return string|self Primary key value 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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_pkeyToArray">
pkeyToArray()
<a href="classes/DataTables-Editor.html#method_pkeyToArray" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">662</span>
<a href="classes/DataTables-Editor.html#source-view.662" class="phpdocumentor-element-found-in__source" data-line="662" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Convert a primary key combined value to an array of field values.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">pkeyToArray</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$value</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$flat</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">false</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, string&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$pkey</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">array&lt;string|int, mixed&gt;</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">$value</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The id that should be split apart</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$flat</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
= <span class="phpdocumentor-signature__argument__default-value">false</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Flag to indicate if the returned array should be
flat (useful for <code class="prettyprint">where</code> conditions) or nested for join tables.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$pkey</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, string&gt;</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The primary key name - will use the instance value
if not given</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>If the primary key value does not match the expected
length based on the primary key configuration, an exception will be
thrown.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
&mdash;
<section class="phpdocumentor-description"><p>Array of field values that the id was made up of.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_pkeyToValue">
pkeyToValue()
<a href="classes/DataTables-Editor.html#method_pkeyToValue" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">615</span>
<a href="classes/DataTables-Editor.html#source-view.615" class="phpdocumentor-element-found-in__source" data-line="615" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Convert a primary key array of field values to a combined value.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">pkeyToValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$row</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$flat</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">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">$row</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The row of data that the primary key value should
be extracted from.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$flat</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
= <span class="phpdocumentor-signature__argument__default-value">false</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Flag to indicate if the given array is flat
(useful for <code class="prettyprint">where</code> conditions) or nested for join tables.</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>If one of the values that the primary key is made up
of cannot be found in the data set given, an Exception will be thrown.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p>The created primary key value.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_process">
process()
<a href="classes/DataTables-Editor.html#method_process" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">696</span>
<a href="classes/DataTables-Editor.html#source-view.696" class="phpdocumentor-element-found-in__source" data-line="696" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Process a request from the Editor client-side to get / set data.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">process</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
<section class="phpdocumentor-description"><p>@param array $data Typically $_POST or $_GET as required by what is sent
by Editor</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">$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">self</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_readTable">
readTable()
<a href="classes/DataTables-Editor.html#method_readTable" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">749</span>
<a href="classes/DataTables-Editor.html#source-view.749" class="phpdocumentor-element-found-in__source" data-line="749" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">The CRUD read table name. If this method is used, Editor will create from the
table name(s) given rather than those given by `Editor-&gt;table()`. This can be
a useful distinction to allow a read from a VIEW (which could make use of a
complex SELECT) while writing to a different table.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">readTable</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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">array&lt;string|int, string&gt;|self</span></code>
<section class="phpdocumentor-description"><p>@param string|array $_,... Read table names given as a single string, an array
of strings or multiple string parameters for the function.</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">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">array&lt;string|int, string&gt;|self</span>
&mdash;
<section class="phpdocumentor-description"><p>Array of read tables names, or self if used as a setter.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_table">
table()
<a href="classes/DataTables-Editor.html#method_table" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">773</span>
<a href="classes/DataTables-Editor.html#source-view.773" class="phpdocumentor-element-found-in__source" data-line="773" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set the table name.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">table</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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 table name designated which DB table Editor will use as its data
source for working with the database. Table names can be given with an
alias, which can be used to simplify larger table names. The field
names would also need to reflect the alias, just like an SQL query. For
example: <code class="prettyprint">users as a</code>.</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">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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_transaction">
transaction()
<a href="classes/DataTables-Editor.html#method_transaction" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">797</span>
<a href="classes/DataTables-Editor.html#source-view.797" class="phpdocumentor-element-found-in__source" data-line="797" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set transaction support.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">transaction</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</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>When enabled (which it is by default) Editor will use an SQL transaction
to ensure data integrity while it is performing operations on the table.
This can be optionally disabled using this method, if required by your
database configuration.</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>Enable (<code class="prettyprint">true</code>) or disabled (<code class="prettyprint">false</code>) transactions.
If not given, then used as a getter.
@return boolean|self Transactions enabled flag, 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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_tryCatch">
tryCatch()
<a href="classes/DataTables-Editor.html#method_tryCatch" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">811</span>
<a href="classes/DataTables-Editor.html#source-view.811" class="phpdocumentor-element-found-in__source" data-line="811" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Enable / try catch when `process()` is called. Disabling this can be
useful for debugging, but is not recommended for production.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">tryCatch</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</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">bool|<a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a></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">bool</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p><code class="prettyprint">true</code> to enable (default), otherwise false to disable</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool|<a href="classes/DataTables-Editor.html"><abbr title="\DataTables\Editor">Editor</abbr></a></span>
&mdash;
<section class="phpdocumentor-description"><p>Value if used as a getter, otherwise <code class="prettyprint">$this</code> when
used as a setter.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_validate">
validate()
<a href="classes/DataTables-Editor.html#method_validate" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">833</span>
<a href="classes/DataTables-Editor.html#source-view.833" class="phpdocumentor-element-found-in__source" data-line="833" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Perform validation on a data set.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">validate</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__reference-operator">&amp;</span><span class="phpdocumentor-signature__argument__name">$errors</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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>Note that validation is performed on data only when the action is
<code class="prettyprint">create</code> or <code class="prettyprint">edit</code>. Additionally, validation is performed on the <em>wire
data</em> - i.e. that which is submitted from the client, without formatting.
Any formatting required by <code class="prettyprint">setFormatter</code> is performed after the data
from the client has been validated.</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">$errors</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Output array to which field error information will
be written. Each element in the array represents a field in an error
condition. These elements are themselves arrays with two properties
set; <code class="prettyprint">name</code> and <code class="prettyprint">status</code>.
@param array $data The format data to check
@return boolean <code class="prettyprint">true</code> if the data is valid, <code class="prettyprint">false</code> if not.</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>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_validator">
validator()
<a href="classes/DataTables-Editor.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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">876</span>
<a href="classes/DataTables-Editor.html#source-view.876" class="phpdocumentor-element-found-in__source" data-line="876" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set a global validator that will be triggered for the create, edit
and remove actions performed from the client-side. Multiple validators
can be added.</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&nbsp;</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.html"><abbr title="\DataTables\Editor">Editor</abbr></a>|callable</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</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Function to execute when validating the input data.
It is passed three parameters: 1. The editor instance, 2. The action
and 3. The values.</p>
</section>
</dd>
</dl>
<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>|callable</span>
&mdash;
<section class="phpdocumentor-description"><p>Editor instance if called as a setter, or the
validator function if not.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_where">
where()
<a href="classes/DataTables-Editor.html#method_where" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">907</span>
<a href="classes/DataTables-Editor.html#source-view.907" class="phpdocumentor-element-found-in__source" data-line="907" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Where condition to add to the query used to get data from the database.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">where</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string|callable&nbsp;</span><span class="phpdocumentor-signature__argument__name">$key</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&nbsp;</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&nbsp;</span><span class="phpdocumentor-signature__argument__name">$op</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;=&#039;</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, string&gt;|self</span></code>
<section class="phpdocumentor-description"><p>Can be used in two different ways:</p>
<ul>
<li>Simple case: <code class="prettyprint">where( field, value, operator )</code>
</li>
<li>Complex: <code class="prettyprint">where( fn )</code>
</li>
</ul>
<p>The simple case is fairly self explanatory, a condition is applied to the
data that looks like <code class="prettyprint">field operator value</code> (e.g. <code class="prettyprint">name = 'Allan'</code>). The
complex case allows full control over the query conditions by providing a
closure function that has access to the database Query that Editor is
using, so you can use the <code class="prettyprint">where()</code>, <code class="prettyprint">or_where()</code>, <code class="prettyprint">and_where()</code> and
<code class="prettyprint">where_group()</code> methods as you require.</p>
<p>Please be very careful when using this method! If an edit made by a user
using Editor removes the row from the where condition, the result is
undefined (since Editor expects the row to still be available, but the
condition removes it from the result set).</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">$key</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>Single field name or a closure function</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>Single field value.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$op</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
= <span class="phpdocumentor-signature__argument__default-value">&#039;=&#039;</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Condition operator: &lt;, &gt;, = etc</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, string&gt;|self</span>
&mdash;
<section class="phpdocumentor-description"><p>Where condition array, or self if used as a setter.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_whereSet">
whereSet()
<a href="classes/DataTables-Editor.html#method_whereSet" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">938</span>
<a href="classes/DataTables-Editor.html#source-view.938" class="phpdocumentor-element-found-in__source" data-line="938" data-modal="source-view"></a>
</aside>
<p class="phpdocumentor-summary">Get / set if the WHERE conditions should be included in the create and
edit actions.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">whereSet</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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">bool</span></code>
<section class="phpdocumentor-description"><p>@param boolean $_ Include (<code class="prettyprint">true</code>), or not (<code class="prettyprint">false</code>)</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">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">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Current value
@deprecated Note that <code class="prettyprint">whereSet</code> is now deprecated and replaced with the
ability to set values for columns on create and edit. The C# libraries
do not support this option at all.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_write">
write()
<a href="classes/DataTables-Editor.html#method_write" 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.php"><a href="files/editor.html"><abbr title="Editor.php">Editor.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">943</span>
<a href="classes/DataTables-Editor.html#source-view.943" class="phpdocumentor-element-found-in__source" data-line="943" data-modal="source-view"></a>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">write</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$_writeVal</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"></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">$_writeVal</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>
&mdash;
</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.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&nbsp;</span><span class="phpdocumentor-signature__argument__reference-operator">&amp;</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&nbsp;</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&nbsp;</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>
&mdash;
</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.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&nbsp;</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&lt;string|int, mixed&gt;&nbsp;</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&lt;string|int, mixed&gt;</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>
&mdash;
<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.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&#039; 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&nbsp;</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&lt;string|int, mixed&gt;&nbsp;</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&lt;string|int, mixed&gt;</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>
&mdash;
<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.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&#039;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&#039;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&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__reference-operator">&amp;</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&nbsp;</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&nbsp;</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&lt;string|int, mixed&gt;</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>
&mdash;
</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.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.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>