Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
FamilyAbsoluteOrder Class Reference
+ Collaboration diagram for FamilyAbsoluteOrder:

Static Public Member Functions

static getAbsoluteOrders ($relativeOrders, $familyId)
 input relativeOrders is a linear Array ( [0] => Array ( [id] => tst_bc500 [parent] => [family] => 52973 [prev] => first ) [1] => Array ( [id] => tst_b550 [parent] => tst_bc500 [family] => 52973 [prev] => first ) .... More...
 
static completeForNumericOrder (array &$attributes, $familyId)
 

Data Fields

const firstOrder = "::first"
 
const autoOrder = "::auto"
 

Static Protected Member Functions

static completeForNumericOrderByFamilyLevel (array &$familyAttributes)
 
static sortAttributeCallBackfunction ($a, $b)
 
static getFamilyLevel ($famid)
 
static getFamilyInherits ($familyId)
 
static getStructLevel ($attrid, array $attributes)
 
static getPrevious ($attrid, array $sortedAttributes)
 
static getNumericOrder ($attrid, array $attributes)
 
static linearOrderTree (array $tree)
 
static getTreeContent (array $tree, $attrid, $default=[])
 
static deleteNode (array &$tree, $attrid)
 
static updateAttributeTree (array &$tree, array $onlyFamilyTree)
 
static checkTree (array &$tree, $parent="")
 
static updateAttributeTreeItem (array &$tree, $attrid, &$orders)
 
static insertAfter (array &$array, $ref, array &$new)
 
static prependNode (array &$array, $parent, array &$new)
 
static appendNode (array &$array, $parent, array &$new)
 

Detailed Description

Definition at line 18 of file Class.FamilyAbsoluteOrder.php.

Member Function Documentation

static appendNode ( array &  $array,
  $parent,
array &  $new 
)
staticprotected

Definition at line 477 of file Class.FamilyAbsoluteOrder.php.

static checkTree ( array &  $tree,
  $parent = "" 
)
staticprotected

Verify that all attributes are well places in the tree

Parameters
array$tree
string$parent
Exceptions
Exception

Definition at line 377 of file Class.FamilyAbsoluteOrder.php.

static completeForNumericOrder ( array &  $attributes,
  $familyId 
)
static

Complete information (prev) when absolute numeric order is done

Parameters
array$attributes
$familyId

Definition at line 78 of file Class.FamilyAbsoluteOrder.php.

static completeForNumericOrderByFamilyLevel ( array &  $familyAttributes)
staticprotected

Complete information (previous) for a attribute set of a given family

Parameters
array$familyAttributes

Definition at line 106 of file Class.FamilyAbsoluteOrder.php.

static deleteNode ( array &  $tree,
  $attrid 
)
staticprotected

Delete node : return deleted node, false if not found

Parameters
array$tree
$attrid
Returns
bool|array

Definition at line 341 of file Class.FamilyAbsoluteOrder.php.

static getAbsoluteOrders (   $relativeOrders,
  $familyId 
)
static

input relativeOrders is a linear Array ( [0] => Array ( [id] => tst_bc500 [parent] => [family] => 52973 [prev] => first ) [1] => Array ( [id] => tst_b550 [parent] => tst_bc500 [family] => 52973 [prev] => first ) ....

Parameters
array$relativeOrders
int$familyId
Returns
array

Definition at line 45 of file Class.FamilyAbsoluteOrder.php.

static getFamilyInherits (   $familyId)
staticprotected

Get family ancestors

Parameters
$familyId
Returns
int[][]

Definition at line 200 of file Class.FamilyAbsoluteOrder.php.

+ Here is the call graph for this function:

static getFamilyLevel (   $famid)
staticprotected

Get family level of inheritance of family (0 means top family)

Parameters
int$famid
Returns
int

Definition at line 189 of file Class.FamilyAbsoluteOrder.php.

static getNumericOrder (   $attrid,
array  $attributes 
)
staticprotected

Compute numeric order when no order id done

Parameters
string$attrid
array$attributes
Returns
int|float

Definition at line 274 of file Class.FamilyAbsoluteOrder.php.

static getPrevious (   $attrid,
array  $sortedAttributes 
)
staticprotected

Get previous attribute order when only numeric order is done

Parameters
string$attrid
array$sortedAttributes
Returns
string

Definition at line 243 of file Class.FamilyAbsoluteOrder.php.

static getStructLevel (   $attrid,
array  $attributes 
)
staticprotected

Get structure level for an attribute (0 means top level - for tabs or frame)

Parameters
string$attrid
array$attributes
Returns
int
Exceptions
\Dcp\Core\Exception

Definition at line 223 of file Class.FamilyAbsoluteOrder.php.

static getTreeContent ( array  $tree,
  $attrid,
  $default = [] 
)
staticprotected

Get childs for a node

Parameters
array$tree
string$attrid
array$default
Returns
array

Definition at line 320 of file Class.FamilyAbsoluteOrder.php.

static insertAfter ( array &  $array,
  $ref,
array &  $new 
)
staticprotected

Definition at line 449 of file Class.FamilyAbsoluteOrder.php.

static linearOrderTree ( array  $tree)
staticprotected

Linearize tree to be a flat array

Parameters
array$tree
Returns
array

Definition at line 300 of file Class.FamilyAbsoluteOrder.php.

static prependNode ( array &  $array,
  $parent,
array &  $new 
)
staticprotected

Definition at line 463 of file Class.FamilyAbsoluteOrder.php.

static sortAttributeCallBackfunction (   $a,
  $b 
)
staticprotected

Definition at line 166 of file Class.FamilyAbsoluteOrder.php.

static updateAttributeTree ( array &  $tree,
array  $onlyFamilyTree 
)
staticprotected

Add items to the tree

Parameters
array$tree
array$onlyFamilyTree

Definition at line 362 of file Class.FamilyAbsoluteOrder.php.

static updateAttributeTreeItem ( array &  $tree,
  $attrid,
$orders 
)
staticprotected

add single item to the tree

Parameters
array$tree
$attrid
array$orders

Definition at line 401 of file Class.FamilyAbsoluteOrder.php.

Field Documentation

const autoOrder = "::auto"

Definition at line 21 of file Class.FamilyAbsoluteOrder.php.

const firstOrder = "::first"

Definition at line 20 of file Class.FamilyAbsoluteOrder.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen