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

Public Member Functions

 __construct ($id, $docid, $label, $type, $format, $repeat, $order, $link, $visibility, $needed, $isInTitle, $isInAbstract, &$fieldSet, $phpfile, $phpfunc, $elink, $phpconstraint="", $usefor="", $eformat="", $options="", $docname="")
 
 setNeeded ($need)
 
 prepareHtmltextForExport ($value)
 
 getXmlSchema ($la)
 
 common_getXmlSchema (&$play)
 
 getXmlValue (Doc &$doc, $opt=false)
 
 text_getXmlSchema ()
 
 enum_getXmlSchema ()
 
 docid_getXmlSchema ()
 
 date_getXmlSchema ()
 
 timestamp_getXmlSchema ()
 
 color_getXmlSchema ()
 
 int_getXmlSchema ()
 
 longtext_getXmlSchema ()
 
 float_getXmlSchema ()
 
 time_getXmlSchema ()
 
 file_getXmlSchema ()
 
 array_getXmlSchema (&$la)
 
 getTextualValue (Doc $doc, $index=-1, Array $configuration=array())
 
 getNumberValue (Doc $doc, $index=-1, $decimalSeparator=".")
 
 inArray ()
 
 getEnum ($returnDisabled=true)
 
 getEnumLabel ($enumid=null, $returnDisabled=true)
 
 addEnum ($dbaccess, $key, $label)
 
 existEnum ($key, $completeKey=true)
 
- Public Member Functions inherited from BasicAttribute
 __construct ($id, $docid, $label)
 
 getLabel ()
 
 getOption ($x, $def="")
 
 getOptions ()
 
 setOption ($x, $v)
 
 setVisibility ($vis)
 
 isReal ()
 
 inArray ()
 
 isMultiple ()
 
 isMultipleInArray ()
 
 getTab ()
 
 getXmlSchema ($la)
 
 getXmlValue (Doc &$doc, $opt=false)
 
 getTextualValue (Doc $doc, $index=-1, Array $configuration=array())
 
 common_getXmlSchema (&$play)
 

Static Public Member Functions

static resetEnum ()
 
- Static Public Member Functions inherited from BasicAttribute
static encodeXml ($s, $quot=false)
 

Data Fields

const _cEnum = "_CACHE_ENUM"
 
const _cEnumLabel = "_CACHE_ENUMLABEL"
 
const _cParent = "_CACHE_PARENT"
 
 $needed
 
 $format
 
 $eformat
 
 $repeat
 
 $isNormal = true
 
 $isInTitle
 
 $isInAbstract
 
 $link
 
 $phpfile
 
 $phpfunc
 
 $elink
 
 $phpconstraint
 
 $isAlone = false
 
 $enum
 
 $enumlabel
 
- Data Fields inherited from BasicAttribute
const hiddenFieldId = Adoc::HIDDENFIELD
 
 $id
 
 $docid
 
 $labelText
 
 $visibility
 
 $mvisibility
 
 $options
 mask visibility More...
 
 $docname
 
 $type
 
 $usefor
 
 $ordered
 
 $format
 
 $isNormal = null
 
 $fieldSet
 
 $_topt = null
 

Protected Attributes

 $textualValueMultipleSeparator
 
 $originalPhpfile
 
 $originalPhpfunc
 

Detailed Description

NormalAttribute Class Non structural attribute (all attribute except frame and tab)

Author
Anakeen

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

Constructor & Destructor Documentation

__construct (   $id,
  $docid,
  $label,
  $type,
  $format,
  $repeat,
  $order,
  $link,
  $visibility,
  $needed,
  $isInTitle,
  $isInAbstract,
$fieldSet,
  $phpfile,
  $phpfunc,
  $elink,
  $phpconstraint = "",
  $usefor = "",
  $eformat = "",
  $options = "",
  $docname = "" 
)

Normal Attribute constructor : non structural attribute

Parameters
int$idid of the attribute
int$docidid of the family
string$labeldefault translate key
string$typekind of attribute
string$formatformat option
string$repeatis repeteable attr
int$orderdisplay order
string$linklink option
string$visibilityvisibility option
bool$neededis mandotary attribute
bool$isInTitleis used to compute title
bool$isInAbstractis used in abstract view
FieldSetAttribute&$fieldSetparent attribute
string$phpfilephp file used with the phpfunc
string$phpfunchelpers function
string$elinkeling option
string$phpconstraintclass php function
string$useforAttribute or Parameter
string$eformateformat option
string$optionsoption string
string$docname

Definition at line 378 of file Class.DocAttribute.php.

Member Function Documentation

addEnum (   $dbaccess,
  $key,
  $label 
)

add new item in enum list items

Parameters
string$dbaccessdbaccess string
string$keydatabase key
string$labelhuman label
Returns
string error message (empty means ok)

Definition at line 1130 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

array_getXmlSchema ( $la)

Array XML schema

Parameters
BasicAttribute[]&$la
Returns
string

Definition at line 801 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

color_getXmlSchema ( )

Color XML schema

Returns
string

Definition at line 734 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

common_getXmlSchema ( $play)

Generate XML schema layout

Parameters
Layout$play

Definition at line 478 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

date_getXmlSchema ( )

date XML schema

Returns
string

Definition at line 712 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

docid_getXmlSchema ( )

docid XML schema

Returns
string

Definition at line 699 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

enum_getXmlSchema ( )

enum XML schema

Returns
string

Definition at line 678 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

existEnum (   $key,
  $completeKey = true 
)

Test if an enum key exists

Parameters
string$keyenumKey
bool$completeKeyif true test complete key with path else without path
Returns
bool

Definition at line 1270 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

file_getXmlSchema ( )

File XML schema

Returns
string

Definition at line 789 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

float_getXmlSchema ( )

Float XML schema

Returns
string

Definition at line 767 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

getEnum (   $returnDisabled = true)

Return array of enumeration definition the array's keys are the enum key and the values are the labels

Parameters
bool$returnDisabledif false disabled enum are not returned
Returns
array

Definition at line 917 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

getEnumLabel (   $enumid = null,
  $returnDisabled = true 
)

return array of enumeration definition the array'skeys are the enum single key and the values are the complete labels

Parameters
string$enumidthe key of enumerate (if no parameter all labels are returned
bool$returnDisabledif false disabled enum are not returned
Returns
array|string|null

Definition at line 1079 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

getNumberValue ( Doc  $doc,
  $index = - 1,
  $decimalSeparator = "." 
)

Definition at line 875 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

getTextualValue ( Doc  $doc,
  $index = - 1,
Array  $configuration = array() 
)

Get the textual value of an attribute

Parameters
Doc$doccurrent Doc
int$indexindex if multiple
array$configurationvalue config array : dateFormat => 'US' 'ISO', decimalSeparator => '.', longtextMultipleBrToCr => ' ' multipleSeparator => array(0 => 'arrayLine', 1 => 'multiple')

(defaultValue : dateFormat : 'US', decimalSeparator : '.', multiple => array(0 => "\n", 1 => ", "))

Returns
string

Definition at line 833 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

getXmlSchema (   $la)

Generate the xml schema fragment

Parameters
array$laarray of DocAttribute
Returns
string

Definition at line 436 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

getXmlValue ( Doc $doc,
  $opt = false 
)

export values as xml fragment

Parameters
Doc$docworking doc
bool | \exportOptionAttribute$opt
Deprecated:
use class intead
Returns
string

Definition at line 524 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

inArray ( )

to see if an attribute is n item of an array

Returns
boolean

Definition at line 906 of file Class.DocAttribute.php.

int_getXmlSchema ( )

int XML schema

Returns
string

Definition at line 745 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

longtext_getXmlSchema ( )

longText XML schema

Returns
string

Definition at line 756 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

prepareHtmltextForExport (   $value)

Parse htmltext and replace id by logicalname for links

Parameters
string$valueFormated value of attribute
Returns
string Value transformed

Definition at line 417 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

static resetEnum ( )
static

reset Enum cache

Definition at line 1065 of file Class.DocAttribute.php.

setNeeded (   $need)

temporary change need

Parameters
bool$needtrue means needed, false not needed
Returns
void

Definition at line 407 of file Class.DocAttribute.php.

text_getXmlSchema ( )

custom textual XML schema

Returns
string

Definition at line 664 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

time_getXmlSchema ( )

Time XML schema

Returns
string

Definition at line 778 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

timestamp_getXmlSchema ( )

timeStamp XML schema

Returns
string

Definition at line 723 of file Class.DocAttribute.php.

+ Here is the call graph for this function:

Field Documentation

$eformat

Definition at line 310 of file Class.DocAttribute.php.

$elink

Definition at line 324 of file Class.DocAttribute.php.

$enum

Definition at line 334 of file Class.DocAttribute.php.

$enumlabel

Definition at line 338 of file Class.DocAttribute.php.

$format

Definition at line 309 of file Class.DocAttribute.php.

$isAlone = false

Definition at line 330 of file Class.DocAttribute.php.

$isInAbstract

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

$isInTitle

Definition at line 316 of file Class.DocAttribute.php.

$isNormal = true

Definition at line 312 of file Class.DocAttribute.php.

$link

Definition at line 321 of file Class.DocAttribute.php.

$needed

Definition at line 308 of file Class.DocAttribute.php.

$originalPhpfile
protected

Definition at line 351 of file Class.DocAttribute.php.

$originalPhpfunc
protected

Definition at line 352 of file Class.DocAttribute.php.

$phpconstraint

Definition at line 325 of file Class.DocAttribute.php.

$phpfile

Definition at line 322 of file Class.DocAttribute.php.

$phpfunc

Definition at line 323 of file Class.DocAttribute.php.

$repeat

Definition at line 311 of file Class.DocAttribute.php.

$textualValueMultipleSeparator
protected
Initial value:
= array(
0 => "\n",
1 => ", "
)

Definition at line 343 of file Class.DocAttribute.php.

const _cEnum = "_CACHE_ENUM"

Definition at line 302 of file Class.DocAttribute.php.

const _cEnumLabel = "_CACHE_ENUMLABEL"

Definition at line 303 of file Class.DocAttribute.php.

const _cParent = "_CACHE_PARENT"

Definition at line 304 of file Class.DocAttribute.php.


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