|
const | NOBODY = 0 |
|
const | USER_WRITE = 1 |
|
const | ADMIN = 2 |
|
const | STAFF = 3 |
|
const | MANAGER = 4 |
|
const | USER_READ = 5 |
|
const | ALL = 10 |
|
const | TYPE_STR = 0 |
|
const | TYPE_HIDDEN = 1 |
|
const | TYPE_BOOL = 2 |
|
const | TYPE_INT = 3 |
|
const | TYPE_DEC = 4 |
|
const | TYPE_DATE = 5 |
|
const | TYPE_TXT = 6 |
|
const | TYPE_PASS = 7 |
|
const | TYPE_EMAIL = 8 |
|
const | TYPE_URL = 9 |
|
const | TYPE_RADIO = 10 |
|
const | TYPE_SELECT = 11 |
|
const | TABLE = 'fields_config' |
|
|
Db | $zdb |
|
array | $core_db_fields = array() |
|
array | $all_required = array() |
|
array | $all_visibles = array() |
|
array | $categorized_fields = array() |
|
string | $table |
|
array | $defaults = null |
|
array | $cats_defaults = null |
|
Fields config class for galette : defines fields visibility for lists and forms defines fields order and requirement flag for forms
- Author
- Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be
◆ __construct()
Galette\Entity\FieldsConfig::__construct |
( |
Db |
$zdb, |
|
|
string |
$table, |
|
|
array |
$defaults, |
|
|
array |
$cats_defaults, |
|
|
bool |
$install = false |
|
) |
| |
Default constructor
- Parameters
-
Db | $zdb | Database |
string | $table | the table for which to get fields configuration |
| array<string,mixed> | $defaults default values |
| array<string,mixed> | $cats_defaults default categories values |
boolean | $install | Are we calling from installer? |
◆ addToLists()
Galette\Entity\FieldsConfig::addToLists |
( |
array |
$field | ) |
|
|
protected |
◆ buildField()
Galette\Entity\FieldsConfig::buildField |
( |
ArrayObject |
$rset | ) |
|
|
protected |
Prepare a field (required data, automation)
- Parameters
-
ArrayObject<string,int|string> | $rset DB ResultSet row |
- Returns
- array<string, mixed>
Reimplemented in Galette\Entity\ListsConfig.
◆ buildLists()
Galette\Entity\FieldsConfig::buildLists |
( |
| ) |
|
|
protected |
Create field array configuration, Several lists of fields are kept (visible, requireds, etc), build them.
- Returns
- void
Reimplemented in Galette\Entity\ListsConfig.
◆ filterVisible()
Galette\Entity\FieldsConfig::filterVisible |
( |
Login |
$login, |
|
|
array & |
$fields |
|
) |
| |
Filter visible fields
- Parameters
-
Login | $login | Login instance |
| array<string,mixed> | $fields Fields list |
- Returns
- void
◆ getCategorizedFields()
Galette\Entity\FieldsConfig::getCategorizedFields |
( |
| ) |
|
Get all fields with their categories
- Returns
- array<int, array<int, array<string, mixed>>>
◆ getDisplayElements()
Galette\Entity\FieldsConfig::getDisplayElements |
( |
Login |
$login | ) |
|
Retrieve display elements
- Parameters
-
Login | $login | Login instance |
- Returns
- array<int,object>
Reimplemented in Galette\Entity\ListsConfig.
◆ getField()
Galette\Entity\FieldsConfig::getField |
( |
string |
$name | ) |
|
Get field configuration
- Parameters
-
- Returns
- array<string,mixed>
◆ getFormElements()
Galette\Entity\FieldsConfig::getFormElements |
( |
Login |
$login, |
|
|
bool |
$new, |
|
|
bool |
$selfs = false |
|
) |
| |
Retrieve form elements
- Parameters
-
Login | $login | Login instance |
boolean | $new | True when adding a new member |
boolean | $selfs | True if we're called from self subscription page |
- Returns
- array<string, array<int,object>>
◆ getMassiveFormElements()
Galette\Entity\FieldsConfig::getMassiveFormElements |
( |
array |
$fields, |
|
|
Login |
$login |
|
) |
| |
Get fields for massive changes
- See also
- FieldsConfig::getFormElements
- Parameters
-
| array<string,mixed> | $fields Member fields |
Login | $login | Login instance |
- Returns
- array<string,mixed>
◆ getNonRequired()
Galette\Entity\FieldsConfig::getNonRequired |
( |
| ) |
|
Get non required fields
- Returns
- array<string>
◆ getRequired()
Galette\Entity\FieldsConfig::getRequired |
( |
| ) |
|
Get required fields
- Returns
- array<string, bool> of all required fields. Field names = keys
◆ getVisibilities()
Galette\Entity\FieldsConfig::getVisibilities |
( |
| ) |
|
Get visible fields
- Returns
- array<string,int> of all visibles fields
◆ getVisibility()
Galette\Entity\FieldsConfig::getVisibility |
( |
string |
$field | ) |
|
Get visibility for specified field
- Parameters
-
string | $field | The requested field |
- Returns
- integer
Reimplemented in Galette\Entity\ListsConfig.
◆ installInit()
Galette\Entity\FieldsConfig::installInit |
( |
| ) |
|
Set default fields configuration at install time. All previous existing values will be dropped first, including fields categories.
- Returns
- boolean
- Exceptions
-
◆ isRequired()
Galette\Entity\FieldsConfig::isRequired |
( |
string |
$field | ) |
|
Is a field set as required?
- Parameters
-
- Returns
- boolean
◆ isSelfExcluded()
Galette\Entity\FieldsConfig::isSelfExcluded |
( |
string |
$name | ) |
|
Does field should be displayed in self subscription page
- Parameters
-
- Returns
- boolean
◆ migrateRequired()
Galette\Entity\FieldsConfig::migrateRequired |
( |
| ) |
|
Migrate old required fields configuration Only needed for 0.7.4 upgrade (should have been 0.7.3 - but I missed that.)
- Returns
- boolean
◆ prepareField()
Galette\Entity\FieldsConfig::prepareField |
( |
ArrayObject |
$rset | ) |
|
|
protected |
Prepare a field (required data, automation)
- Parameters
-
ArrayObject<string,int|string> | $rset DB ResultSet row |
- Returns
- ArrayObject<string, int|string>
◆ setFields()
Galette\Entity\FieldsConfig::setFields |
( |
array |
$fields | ) |
|
Set fields
- Parameters
-
array<int,array<int,array<string,mixed>>> | $fields categorized fields array |
- Returns
- boolean
◆ setNotRequired()
Galette\Entity\FieldsConfig::setNotRequired |
( |
string |
$field | ) |
|
Temporary set a field as not required (password for existing members for example)
- Parameters
-
- Returns
- void
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/galette-apidoc/checkouts/develop/galette/lib/Galette/Entity/FieldsConfig.php