Documentation

IMP_Flag_Base
in package
implements Serializable

AbstractYes

This class provides the data structure for a message flag.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2010-2017 Horde LLC

license

http://www.horde.org/licenses/gpl GPL

Table of Contents

Interfaces

Serializable

Constants

DEFAULT_BG  = '#fff'

Properties

$bgcolor  : string
$bgdefault  : bool
$canset  : bool
$css  : string
$cssicon  : string
$fgcolor  : string
$form_set  : string
$form_unset  : string
$hash  : string
$id  : string
$label  : string
$span  : string
$_bgcolor  : string
The background color.
$_canset  : bool
Is this flag settable by the user?
$_css  : string
The CSS class.
$_cssIcon  : string
The CSS class for the icon.
$_id  : string
Unique ID.

Methods

__get()  : mixed
__serialize()  : array<string|int, mixed>
__set()  : mixed
Set properties.
__toString()  : string
String representation of the object.
__unserialize()  : void
changed()  : mixed
Given a list of flag objects, determines if this flag's status has changed.
getLabel()  : string
Return the flag label.
serialize()  : mixed
unserialize()  : mixed
_getLabel()  : string
Return the flag label.

Constants

DEFAULT_BG

public mixed DEFAULT_BG = '#fff'

Properties

$bgcolor

public string $bgcolor

The background color.

$bgdefault read-only

public bool $bgdefault

Is the background color the default?

$canset read-only

public bool $canset

Can this flag be set by the user?

$css read-only

public string $css

The CSS class for the icon when the flag is set.

$cssicon read-only

public string $cssicon

The CSS class for the icon.

$fgcolor read-only

public string $fgcolor

The foreground (text) color.

$form_set read-only

public string $form_set

Form value to use when setting flag.

$form_unset read-only

public string $form_unset

Form value to use when unsetting flag.

$hash read-only

public string $hash

Unique hash of this flag.

$id read-only

public string $id

Unique ID.

$label read-only

public string $label

The query label.

$span read-only

public string $span

Return SPAN HTML to output the icon for use in a mailbox row.

$_bgcolor

The background color.

protected string $_bgcolor = ''

$_canset

Is this flag settable by the user?

protected bool $_canset = \false

$_css

The CSS class.

protected string $_css = ''

$_cssIcon

The CSS class for the icon.

protected string $_cssIcon = ''

$_id

Unique ID.

protected string $_id = ''

Methods

__get()

public __get(mixed $name) : mixed
Parameters
$name : mixed

__serialize()

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

__set()

Set properties.

public __set(string $name, string $value) : mixed
Parameters
$name : string

Available properties:

  • bgcolor: (string) The background color.
$value : string

Property value.

__toString()

String representation of the object.

public __toString() : string
Return values
string

String representation (Flag ID).

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

changed()

Given a list of flag objects, determines if this flag's status has changed.

public changed(array<string|int, mixed> $obs, bool $add) : mixed
Parameters
$obs : array<string|int, mixed>

A list of IMP_Flag_Base objects.

$add : bool

True if these flags were added, false if they were removed.

Return values
mixed

Null if no change, true if flag is added, false if flag is removed.

getLabel()

Return the flag label.

public getLabel([bool $set = true ]) : string
Parameters
$set : bool = true

Return label for setting the flag?

Return values
string

The label.

serialize()

public serialize() : mixed

unserialize()

public unserialize(mixed $data) : mixed
Parameters
$data : mixed

_getLabel()

Return the flag label.

protected abstract _getLabel() : string

Necessary evil as gettext strings can not be set directly to object properties.

Return values
string

The label.


        
On this page

Search results