mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 12:31:17 +02:00
Updates to legacy code in ProcessTemplate, cleaning things up a bit
This commit is contained in:
@@ -29,6 +29,12 @@
|
|||||||
* @property array $viewRoles Role IDs with view access, applicable only if access control is enabled. #pw-group-access
|
* @property array $viewRoles Role IDs with view access, applicable only if access control is enabled. #pw-group-access
|
||||||
* @property array|null $orderByCols Columns that WireArray values are sorted by (default=null), Example: "sort" or "-created". #pw-internal
|
* @property array|null $orderByCols Columns that WireArray values are sorted by (default=null), Example: "sort" or "-created". #pw-internal
|
||||||
* @property int|null $paginationLimit Used by paginated WireArray values to indicate limit to use during load. #pw-internal
|
* @property int|null $paginationLimit Used by paginated WireArray values to indicate limit to use during load. #pw-internal
|
||||||
|
*
|
||||||
|
* Common Inputfield properties that Field objects store:
|
||||||
|
* @property int|bool|null $required
|
||||||
|
* @property string|null $requiredIf
|
||||||
|
* @property string|null $showIf
|
||||||
|
* @property int|null $columnWidth
|
||||||
*
|
*
|
||||||
* @method bool viewable(Page $page = null, User $user = null) Is the field viewable on the given $page by the given $user? #pw-group-access
|
* @method bool viewable(Page $page = null, User $user = null) Is the field viewable on the given $page by the given $user? #pw-group-access
|
||||||
* @method bool editable(Page $page = null, User $user = null) Is the field editable on the given $page by the given $user? #pw-group-access
|
* @method bool editable(Page $page = null, User $user = null) Is the field editable on the given $page by the given $user? #pw-group-access
|
||||||
|
@@ -19,6 +19,8 @@ class Fieldgroups extends WireSaveableItemsLookup {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Instances of FieldgroupsArray
|
* Instances of FieldgroupsArray
|
||||||
|
*
|
||||||
|
* @var FieldgroupsArray
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected $fieldgroupsArray;
|
protected $fieldgroupsArray;
|
||||||
@@ -60,6 +62,8 @@ class Fieldgroups extends WireSaveableItemsLookup {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Per WireSaveableItems interface, return all available Fieldgroup instances
|
* Per WireSaveableItems interface, return all available Fieldgroup instances
|
||||||
|
*
|
||||||
|
* @return FieldgroupsArray
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getAll() {
|
public function getAll() {
|
||||||
@@ -68,6 +72,8 @@ class Fieldgroups extends WireSaveableItemsLookup {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Per WireSaveableItems interface, create a blank instance of a Fieldgroup
|
* Per WireSaveableItems interface, create a blank instance of a Fieldgroup
|
||||||
|
*
|
||||||
|
* @return Fieldgroup
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function makeBlankItem() {
|
public function makeBlankItem() {
|
||||||
@@ -76,6 +82,8 @@ class Fieldgroups extends WireSaveableItemsLookup {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Per WireSaveableItems interface, return the name of the table that Fieldgroup instances are stored in
|
* Per WireSaveableItems interface, return the name of the table that Fieldgroup instances are stored in
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getTable() {
|
public function getTable() {
|
||||||
@@ -84,6 +92,8 @@ class Fieldgroups extends WireSaveableItemsLookup {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Per WireSaveableItemsLookup interface, return the name of the table that Fields are linked to Fieldgroups
|
* Per WireSaveableItemsLookup interface, return the name of the table that Fields are linked to Fieldgroups
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getLookupTable() {
|
public function getLookupTable() {
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
* @property int $flags Flags (bitmask) assigned to this template. See the flag constants. #pw-group-identification
|
* @property int $flags Flags (bitmask) assigned to this template. See the flag constants. #pw-group-identification
|
||||||
* @property string $ns Namespace found in the template file, or blank if not determined. #pw-group-identification
|
* @property string $ns Namespace found in the template file, or blank if not determined. #pw-group-identification
|
||||||
* @property string $pageClass Class for instantiated page objects. Page assumed if blank, or specify class name. #pw-group-identification
|
* @property string $pageClass Class for instantiated page objects. Page assumed if blank, or specify class name. #pw-group-identification
|
||||||
|
* @property int $modified Last modified time for template or template file
|
||||||
*
|
*
|
||||||
* Fieldgroup/Fields
|
* Fieldgroup/Fields
|
||||||
*
|
*
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
* @method TemplatesArray find($selector) Return the templates matching the the given selector query. #pw-internal
|
* @method TemplatesArray find($selector) Return the templates matching the the given selector query. #pw-internal
|
||||||
* @method bool save(Template $template) Save the given Template.
|
* @method bool save(Template $template) Save the given Template.
|
||||||
* @method bool delete() delete(Template $template) Delete the given Template. Note that this will throw a fatal error if the template is in use by any pages.
|
* @method bool delete() delete(Template $template) Delete the given Template. Note that this will throw a fatal error if the template is in use by any pages.
|
||||||
|
* @method bool|Saveable|Template clone(Saveable $item, $name = '')
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class Templates extends WireSaveableItems {
|
class Templates extends WireSaveableItems {
|
||||||
|
@@ -9,16 +9,27 @@
|
|||||||
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer
|
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer
|
||||||
* https://processwire.com
|
* https://processwire.com
|
||||||
*
|
*
|
||||||
* @method WireArray load(WireArray $items, $selectors = null);
|
* @method WireArray load(WireArray $items, $selectors = null)
|
||||||
* @method bool save(Saveable $item);
|
* @method bool save(Saveable $item)
|
||||||
* @method bool delete(Saveable $item);
|
* @method bool delete(Saveable $item)
|
||||||
|
* @method WireArray find($selectors)
|
||||||
|
* @method void saveReady(Saveable $item) #pw-hooker
|
||||||
|
* @method void deleteReady(Saveable $item) #pw-hooker
|
||||||
|
* @method void cloneReady(Saveable $item, Saveable $copy) #pw-hooker
|
||||||
|
* @method array saved(Saveable $item, array $changes = array()) #pw-hooker
|
||||||
|
* @method void added(Saveable $item) #pw-hooker
|
||||||
|
* @method void deleted(Saveable $item) #pw-hooker
|
||||||
|
* @method void cloned(Saveable $item, Saveable $copy) #pw-hooker
|
||||||
*
|
*
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abstract class WireSaveableItems extends Wire implements \IteratorAggregate {
|
abstract class WireSaveableItems extends Wire implements \IteratorAggregate {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the WireArray that this DAO stores it's items in
|
* Return the WireArray that this DAO stores it's items in
|
||||||
|
*
|
||||||
|
* @return WireArray
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract public function getAll();
|
abstract public function getAll();
|
||||||
@@ -31,6 +42,8 @@ abstract class WireSaveableItems extends Wire implements \IteratorAggregate {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the name of the table that this DAO stores item records in
|
* Return the name of the table that this DAO stores item records in
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
abstract public function getTable();
|
abstract public function getTable();
|
||||||
@@ -40,6 +53,8 @@ abstract class WireSaveableItems extends Wire implements \IteratorAggregate {
|
|||||||
* Return the default name of the field that load() should sort by (default is none)
|
* Return the default name of the field that load() should sort by (default is none)
|
||||||
*
|
*
|
||||||
* This is overridden by selectors if applied during the load method
|
* This is overridden by selectors if applied during the load method
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getSort() { return ''; }
|
public function getSort() { return ''; }
|
||||||
|
@@ -10,6 +10,8 @@
|
|||||||
* @property int $columnWidthSpacing Optionally set the column width spacing (pixels)
|
* @property int $columnWidthSpacing Optionally set the column width spacing (pixels)
|
||||||
* @property string $description Optionally set a description headline for the form
|
* @property string $description Optionally set a description headline for the form
|
||||||
* @property string $confirmText Confirmation text that precedes list of changes (when class InputfieldFormConfirm is active)
|
* @property string $confirmText Confirmation text that precedes list of changes (when class InputfieldFormConfirm is active)
|
||||||
|
* @property string $method Form method attribute (default="post")
|
||||||
|
* @property string $action Form action attribute (default="./")
|
||||||
*
|
*
|
||||||
* Optional classes:
|
* Optional classes:
|
||||||
* =================
|
* =================
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Intended just for outputting markup as help or commentary among other Inputfields
|
* Intended just for outputting markup as help or commentary among other Inputfields
|
||||||
|
*
|
||||||
|
* @property callable|string|null $markupFunction
|
||||||
|
* @property array $textformatters
|
||||||
|
* @property string $markupText
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user