Documentation

FieldManager extends StaticFactory

User Extended by Shawn Clake Class FieldManager User Extended is licensed under the MIT license.

Tags
author

Shawn Clake shawn.clake@gmail.com

link
https://github.com/ShawnClake/UserExtended
license

https://github.com/ShawnClake/UserExtended/blob/master/LICENSE MIT

Table of Contents

$fields  : mixed
Contains all of the currently existing fields
__callStatic()  : mixed
Main factory function which utilizes PHP's magic method to call a suffixed factory function on the child class.
all()  :
allFactory()  : $this
Factory function which fills the field manager with all existing fields
createField()  : Field
Creates a field
deleteField()  : mixed
Deletes a field
factory()  : mixed
Helper function which can also be used to simply create an instance of a child class in cases where initialization functions aren't needed.
findField()  : array<string|int, mixed>
Finds and returns a Field and its properties
getSortedFields()  : array<string|int, mixed>
Returns all of the custom fields in order
isRequried()  : bool
TODO: I'm not sure this function is needed.
makeFlags()  : array<string|int, mixed>
Generates a flags array. This is a helper function
updateField()  : array<string|int, mixed>
Updates a field.

Properties

$fields

Contains all of the currently existing fields

private mixed $fields

Methods

__callStatic()

Main factory function which utilizes PHP's magic method to call a suffixed factory function on the child class.

public static __callStatic( $name,  $arguments) : mixed
Parameters
$name :
$arguments :
Return values
mixed

all()

public static all() :

FieldManager

Return values

allFactory()

Factory function which fills the field manager with all existing fields

public allFactory() : $this
Return values
$this

createField()

Creates a field

public static createField( $name,  $code,  $description[, string $validation = "" ][, string $type = UserSettingsManager::UE_FORM_TEXT ][, array<string|int, mixed> $flags = [] ][, array<string|int, mixed> $data = [] ]) : Field
Parameters
$name :
$code :
$description :
$validation : string = ""
$type : string = UserSettingsManager::UE_FORM_TEXT
$flags : array<string|int, mixed> = []
$data : array<string|int, mixed> = []
Return values
Field

deleteField()

Deletes a field

public static deleteField( $code) : mixed
Parameters
$code :
Return values
mixed

factory()

Helper function which can also be used to simply create an instance of a child class in cases where initialization functions aren't needed.

public static factory() : mixed

Generally you will want to use the static magic method below.

Return values
mixed

findField()

Finds and returns a Field and its properties

public static findField( $code) : array<string|int, mixed>
Parameters
$code :
Return values
array<string|int, mixed>

getSortedFields()

Returns all of the custom fields in order

public getSortedFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

isRequried()

TODO: I'm not sure this function is needed.

public static isRequried( $code) : bool

Determines if the given field is required to register

Parameters
$code :
Return values
bool

makeFlags()

Generates a flags array. This is a helper function

public static makeFlags([bool $enabled = false ][, bool $registerable = true ][, bool $editable = true ][, bool $encryptable = false ]) : array<string|int, mixed>
Parameters
$enabled : bool = false
$registerable : bool = true
$editable : bool = true
$encryptable : bool = false
Return values
array<string|int, mixed>

updateField()

Updates a field.

public static updateField( $name,  $code,  $description[, string $type = UserSettingsManager::UE_FORM_TEXT ][, string $validation = "" ][, array<string|int, mixed> $flags = [] ][, array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
$name :
$code :
$description :
$type : string = UserSettingsManager::UE_FORM_TEXT
$validation : string = ""
$flags : array<string|int, mixed> = []
$data : array<string|int, mixed> = []
Return values
array<string|int, mixed>

Search results