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

Public Member Functions

 __construct ($doc=null)
 
 setPropDateStyle ($propDateStyle)
 
 setVerifyAttributeAccess ($verifyAttributeAccess)
 
 setNoAccessText ($noAccessText)
 
 setNc ($s)
 
 useCollection (DocumentList &$l)
 
 setDecimalSeparator ($s)
 
 stripHtmlTags ($strip=true)
 
 setDateStyle ($style)
 
 addProperty ($props)
 
 addAttribute ($attrid)
 
 setHookAdvancedStatus ($hookFunction)
 
 setAttributeRenderHook ($hookFunction)
 
 setDocumentRenderHook ($hookFunction)
 
 setPropertyRenderHook ($hookFunction)
 
 render ()
 
 getInfo (NormalAttribute $oa, $value, $doc=null)
 
 setLongtextMultipleBrToCr ($longtextMultipleBrToCr)
 
 getDebug ()
 

Static Public Member Functions

static getAvailableProperties ()
 
static getDisplayValue ($info, $oAttr, $index=-1, $configuration=array())
 

Data Fields

const noAccessText = "N.C."
 
 $debug = array()
 
 $familyIconSize = 24
 
 $relationIconSize = 14
 
 $mimeTypeIconSize = 14
 
 $imageThumbnailSize = 48
 
 $relationNoAccessText = ""
 
 $useShowEmptyOption = true
 
const title = "title"
 
const propName = "name"
 
const propId = "id"
 
const propIcon = "icon"
 
const propLocked = "locked"
 
const propInitid = "initid"
 
const propRevision = "revision"
 
const propUrl = "url"
 
const propFamily = "family"
 
const propLastAccessDate = "lastAccessDate"
 
const propLastModificationDate = "lastModificationDate"
 
const propRevisionData = "revisionData"
 
const propViewController = "viewController"
 
const propWorkflow = "workflow"
 
const propAffected = "affected"
 
const propStatus = "status"
 
const propNote = "note"
 
const propUsage = "usage"
 
const propType = "type"
 
const propTags = "tags"
 
const propSecurity = "security"
 
const propCreationDate = "creationDate"
 
const propCreatedBy = "createdBy"
 
const propState = "state"
 
const revdate = "revdate"
 
const adate = "adate"
 
const cdate = "cdate"
 

Protected Member Functions

 callHookStatus ($s)
 
 callAttributeRenderHook ($info, $oa,\Doc $doc)
 
 callDocumentRenderHook (array $info,\Doc $doc)
 
 callPropertyRenderHook ($info, $propId,\Doc $doc)
 
 getPropInfo ($propName, Doc $doc)
 
 getCreatedByData (\Doc $doc)
 
 getStatusData (\Doc $doc)
 
 getUsageData (\Doc $doc)
 
 getTypeData (\Doc $doc)
 
 getNoteData (\Doc $doc)
 
 getWorkflowData (\Doc $doc)
 
 getApplicationTagsData (\Doc $doc)
 
 getAllocatedData (\Doc $doc)
 
 getAccountData ($accountId,\Doc $doc)
 
 getSecurityData (\Doc $doc)
 
 getViewControllerData (\Doc $doc)
 
 getRevisionData (\Doc $doc)
 
 getFamilyInfo (\Doc $doc)
 
 getFormatDate ($v, $dateStyle= '')
 
 getState (Doc $doc)
 
 getSingleInfo (NormalAttribute $oa, $value, $doc=null, $index=-1)
 

Static Protected Member Functions

static rtrimNull (array $t)
 

Protected Attributes

 $dl = null
 
 $propsKeys = array()
 
 $fmtProps
 
 $fmtAttrs = array()
 
 $ncAttribute = ''
 
 $noAccessText = self::noAccessText
 
 $attributeGrants = array()
 
 $decimalSeparator = ','
 
 $dateStyle = DateAttributeValue::defaultStyle
 
 $propDateStyle = null
 
 $stripHtmlTag = false
 
 $longtextMultipleBrToCr = "\n"
 
 $verifyAttributeAccess = true
 
 $hookStatus = null
 
 $singleDocument = false
 
 $renderAttributeHook = null
 
 $renderDocumentHook = null
 
 $renderPropertyHook = null
 

Detailed Description

Format document list to be easily used in

$s = new \SearchDoc(self::$dbaccess, $this->famName);
$s->setObjectReturn();
$dl = $s->search()->getDocumentList();
$fc = new \FormatCollection();
$fc->useCollection($dl);
$fc->addProperty($fc::propName);
$fc->addAttribute(('tst_x'));
$fc->setNc($nc);
$r = $fc->render();

Definition at line 28 of file Class.FormatCollection.php.

Constructor & Destructor Documentation

__construct (   $doc = null)

Definition at line 214 of file Class.FormatCollection.php.

Member Function Documentation

addAttribute (   $attrid)

add an attribute to render by default no attributes are rendered

Parameters
string$attrid
Returns
FormatCollection

Definition at line 361 of file Class.FormatCollection.php.

addProperty (   $props)

add a property to render by default id and title are rendered

Parameters
string$props
Exceptions
\Dcp\Fmtc\Exception
Returns
FormatCollection

Definition at line 347 of file Class.FormatCollection.php.

callAttributeRenderHook (   $info,
  $oa,
\Doc  $doc 
)
protected
Parameters
StandardAttributeValue | null$info
BasicAttribute | null$oa
Doc$doc
Returns
StandardAttributeValue

Definition at line 426 of file Class.FormatCollection.php.

callDocumentRenderHook ( array  $info,
\Doc  $doc 
)
protected
Parameters
array$info
Doc$doc
Returns
StandardAttributeValue

Definition at line 439 of file Class.FormatCollection.php.

callHookStatus (   $s)
protected

Definition at line 411 of file Class.FormatCollection.php.

callPropertyRenderHook (   $info,
  $propId,
\Doc  $doc 
)
protected
Parameters
StandardAttributeValue | string | null$info
string$propId
Doc$doc
Returns
StandardAttributeValue

Definition at line 453 of file Class.FormatCollection.php.

getAccountData (   $accountId,
\Doc  $doc 
)
protected

Definition at line 682 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

getAllocatedData ( \Doc  $doc)
protected

Definition at line 670 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

getApplicationTagsData ( \Doc  $doc)
protected

Definition at line 661 of file Class.FormatCollection.php.

static getAvailableProperties ( )
static

Definition at line 225 of file Class.FormatCollection.php.

getCreatedByData ( \Doc  $doc)
protected

Definition at line 579 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

getDebug ( )

get some stat to estimate time cost

Returns
array

Definition at line 975 of file Class.FormatCollection.php.

static getDisplayValue (   $info,
  $oAttr,
  $index = - 1,
  $configuration = array() 
)
static
Parameters
array | stdClass$info
NormalAttribute$oAttr
int$index
array$configuration
Returns
string

Definition at line 997 of file Class.FormatCollection.php.

getFamilyInfo ( \Doc  $doc)
protected

Definition at line 791 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

getFormatDate (   $v,
  $dateStyle = '' 
)
protected

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

+ Here is the call graph for this function:

getInfo ( NormalAttribute  $oa,
  $value,
  $doc = null 
)

Definition at line 850 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

getNoteData ( \Doc  $doc)
protected

Definition at line 629 of file Class.FormatCollection.php.

getPropInfo (   $propName,
Doc  $doc 
)
protected

Definition at line 514 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

getRevisionData ( \Doc  $doc)
protected

Definition at line 781 of file Class.FormatCollection.php.

getSecurityData ( \Doc  $doc)
protected

Definition at line 700 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

getSingleInfo ( NormalAttribute  $oa,
  $value,
  $doc = null,
  $index = - 1 
)
protected

Definition at line 898 of file Class.FormatCollection.php.

getState ( Doc  $doc)
protected

Definition at line 817 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

getStatusData ( \Doc  $doc)
protected

Definition at line 590 of file Class.FormatCollection.php.

getTypeData ( \Doc  $doc)
protected

Definition at line 609 of file Class.FormatCollection.php.

getUsageData ( \Doc  $doc)
protected

Definition at line 601 of file Class.FormatCollection.php.

getViewControllerData ( \Doc  $doc)
protected

Definition at line 764 of file Class.FormatCollection.php.

getWorkflowData ( \Doc  $doc)
protected

Definition at line 645 of file Class.FormatCollection.php.

render ( )

return formatted document list to be easily exported in other format

Exceptions
\Dcp\Fmtc\Exception
Returns
array

Definition at line 466 of file Class.FormatCollection.php.

+ Here is the call graph for this function:

static rtrimNull ( array  $t)
staticprotected

delete last null values

Parameters
array$t
Returns
array

Definition at line 841 of file Class.FormatCollection.php.

setAttributeRenderHook (   $hookFunction)

apply a callback on each returned value to modify render

Parameters
Closure$hookFunction
Returns
$this

Definition at line 384 of file Class.FormatCollection.php.

setDateStyle (   $style)

set date style possible values are :DateAttributeValue::defaultStyle,DateAttributeValue::frenchStyle,DateAttributeValue::isoWTStyle,DateAttributeValue::isoStyle

Parameters
string$style
Returns
$this
Exceptions
Dcp\Fmtc\Exception

Definition at line 327 of file Class.FormatCollection.php.

setDecimalSeparator (   $s)

set decimal character character to use for double and money type

Parameters
string$sa character to separate decimal part from integer part
Returns
FormatCollection

Definition at line 305 of file Class.FormatCollection.php.

setDocumentRenderHook (   $hookFunction)

apply a callback on each document returned to modify render

Parameters
Closure$hookFunction
Returns
$this

Definition at line 395 of file Class.FormatCollection.php.

setHookAdvancedStatus (   $hookFunction)

apply a callback on each document if callback return false, the document is skipped from list

Parameters
Closure$hookFunction
Returns
$this

Definition at line 373 of file Class.FormatCollection.php.

setLongtextMultipleBrToCr (   $longtextMultipleBrToCr)
Parameters
string$longtextMultipleBrToCr

Definition at line 967 of file Class.FormatCollection.php.

setNc (   $s)

default value returned when attribute not found in document

Parameters
$s
Returns

Definition at line 285 of file Class.FormatCollection.php.

setNoAccessText (   $noAccessText)

Use when cannot access attribut value Due to visibility "I"

Parameters
string$noAccessText

Definition at line 276 of file Class.FormatCollection.php.

setPropDateStyle (   $propDateStyle)
Parameters
string$propDateStyle
Returns
$this
Exceptions
\Dcp\Fmtc\Exception

Definition at line 250 of file Class.FormatCollection.php.

setPropertyRenderHook (   $hookFunction)

apply a callback on each returned property to modify render value

Parameters
Closure$hookFunction
Returns
$this

Definition at line 406 of file Class.FormatCollection.php.

setVerifyAttributeAccess (   $verifyAttributeAccess)

If false, attribute with "I" visibility are returned

Parameters
boolean$verifyAttributeAccess

Definition at line 267 of file Class.FormatCollection.php.

stripHtmlTags (   $strip = true)

display Value of htmltext content value without tags

Parameters
bool$strip
Returns
FormatCollection

Definition at line 315 of file Class.FormatCollection.php.

useCollection ( DocumentList $l)

document list to format

Parameters
DocumentList$l
Returns
FormatCollection

Definition at line 295 of file Class.FormatCollection.php.

Field Documentation

$attributeGrants = array()
protected

Definition at line 70 of file Class.FormatCollection.php.

$dateStyle = DateAttributeValue::defaultStyle
protected

Definition at line 74 of file Class.FormatCollection.php.

$debug = array()

Definition at line 35 of file Class.FormatCollection.php.

$decimalSeparator = ','
protected

Definition at line 72 of file Class.FormatCollection.php.

$dl = null
protected

Definition at line 34 of file Class.FormatCollection.php.

$familyIconSize = 24

Definition at line 48 of file Class.FormatCollection.php.

$fmtAttrs = array()
protected

Definition at line 41 of file Class.FormatCollection.php.

$fmtProps
protected
Initial value:
= array(
self::propId,
self::title
)

Definition at line 37 of file Class.FormatCollection.php.

$hookStatus = null
protected

Definition at line 89 of file Class.FormatCollection.php.

$imageThumbnailSize = 48

Definition at line 60 of file Class.FormatCollection.php.

$longtextMultipleBrToCr = "\n"
protected

Definition at line 80 of file Class.FormatCollection.php.

$mimeTypeIconSize = 14

Definition at line 56 of file Class.FormatCollection.php.

$ncAttribute = ''
protected

Definition at line 42 of file Class.FormatCollection.php.

$noAccessText = self::noAccessText
protected

Definition at line 44 of file Class.FormatCollection.php.

$propDateStyle = null
protected

Definition at line 76 of file Class.FormatCollection.php.

$propsKeys = array()
protected

Definition at line 36 of file Class.FormatCollection.php.

$relationIconSize = 14

Definition at line 52 of file Class.FormatCollection.php.

$relationNoAccessText = ""

Definition at line 64 of file Class.FormatCollection.php.

$renderAttributeHook = null
protected

Definition at line 97 of file Class.FormatCollection.php.

$renderDocumentHook = null
protected

Definition at line 101 of file Class.FormatCollection.php.

$renderPropertyHook = null
protected

Definition at line 105 of file Class.FormatCollection.php.

$singleDocument = false
protected

Definition at line 93 of file Class.FormatCollection.php.

$stripHtmlTag = false
protected

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

$useShowEmptyOption = true

Definition at line 68 of file Class.FormatCollection.php.

$verifyAttributeAccess = true
protected

Definition at line 85 of file Class.FormatCollection.php.

const adate = "adate"

access date

Definition at line 208 of file Class.FormatCollection.php.

const cdate = "cdate"

creation date

Definition at line 212 of file Class.FormatCollection.php.

const noAccessText = "N.C."

Definition at line 30 of file Class.FormatCollection.php.

const propAffected = "affected"

allocated information

Definition at line 163 of file Class.FormatCollection.php.

const propCreatedBy = "createdBy"

Creation user (of revision 0)

Definition at line 196 of file Class.FormatCollection.php.

const propCreationDate = "creationDate"

Creation date (of revision 0)

Definition at line 192 of file Class.FormatCollection.php.

const propFamily = "family"

family information

Definition at line 139 of file Class.FormatCollection.php.

const propIcon = "icon"

icon property

Definition at line 119 of file Class.FormatCollection.php.

const propId = "id"

id property

Definition at line 115 of file Class.FormatCollection.php.

const propInitid = "initid"

initid property

Definition at line 127 of file Class.FormatCollection.php.

const propLastAccessDate = "lastAccessDate"

Last access date

Definition at line 143 of file Class.FormatCollection.php.

const propLastModificationDate = "lastModificationDate"

Last modification date

Definition at line 147 of file Class.FormatCollection.php.

const propLocked = "locked"

locked property

Definition at line 123 of file Class.FormatCollection.php.

const propName = "name"

name property

Definition at line 111 of file Class.FormatCollection.php.

const propNote = "note"

note information

Definition at line 171 of file Class.FormatCollection.php.

const propRevision = "revision"

revision property

Definition at line 131 of file Class.FormatCollection.php.

const propRevisionData = "revisionData"

Some informations about revision

Definition at line 151 of file Class.FormatCollection.php.

const propSecurity = "security"

Security information (lock, profil)

Definition at line 188 of file Class.FormatCollection.php.

const propState = "state"

state property

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

const propStatus = "status"

status information : alive, deleted, fixed

Definition at line 167 of file Class.FormatCollection.php.

const propTags = "tags"

Applictaion Tags list

See Also
::addAtag()

Definition at line 184 of file Class.FormatCollection.php.

const propType = "type"

doctype information

Definition at line 179 of file Class.FormatCollection.php.

const propUrl = "url"

url access to document

Definition at line 135 of file Class.FormatCollection.php.

const propUsage = "usage"

usefor information

Definition at line 175 of file Class.FormatCollection.php.

const propViewController = "viewController"

View Controller information

Definition at line 155 of file Class.FormatCollection.php.

const propWorkflow = "workflow"

Workflow information

Definition at line 159 of file Class.FormatCollection.php.

const revdate = "revdate"

revision date

Definition at line 204 of file Class.FormatCollection.php.

const title = "title"

Definition at line 107 of file Class.FormatCollection.php.


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