ILIAS
Release_5_0_x_branch Revision 61816
|
Class ilContainerRenderer. More...
Public Member Functions | |
__construct ($a_enable_manage_select_all=false, $a_enable_multi_download=false, $a_active_block_ordering=false, array $a_block_custom_positions=null) | |
Constructor. | |
addTypeBlock ($a_type, $a_prefix=null, $a_postfix=null) | |
Add type block. | |
hasTypeBlock ($a_type) | |
Type block already exists? | |
addCustomBlock ($a_id, $a_caption, $a_actions=null) | |
Add custom block. | |
hasCustomBlock ($a_id) | |
Custom block already exists? | |
isValidBlock ($a_id) | |
Any block with id exists? | |
hideItem ($a_id) | |
Mark item id as used, but do not render. | |
removeItem ($a_id) | |
Remove item (from any block) | |
hasItem ($a_id) | |
Item with id exists? | |
addItemToBlock ($a_block_id, $a_item_type, $a_item_id, $a_item_html, $a_force=false) | |
Add item to existing block. | |
addDetailsLevel ($a_level, $a_url, $a_active=false) | |
Add details level. | |
resetDetails () | |
Reset/remove all detail levels. | |
setBlockPosition ($a_block_id, $a_pos) | |
Set block position. | |
getHTML () | |
Get rendered html (of all blocks) | |
renderSingleTypeBlock ($a_type) | |
Get rendered html of single type block. | |
renderSingleCustomBlock ($a_id) | |
Get rendered html of single custom block. | |
renderDetails (ilTemplate $a_tpl) | |
Render detail level. |
Data Fields | |
const | UNIQUE_SEPARATOR = "-" |
Protected Member Functions | |
processBlockPositions () | |
Process block positions. | |
renderHelperCustomBlock (ilTemplate $a_block_tpl, $a_block_id, $a_is_single=false) | |
Render custom block. | |
renderHelperTypeBlock (ilTemplate $a_block_tpl, $a_type, $a_is_single=false) | |
Render type block. | |
renderHelperGeneric (ilTemplate $a_block_tpl, $a_block_id, array $a_block, $a_is_single=false) | |
Render block. | |
initBlockTemplate () | |
Init template. | |
addHeaderRow (ilTemplate $a_tpl, $a_type="", $a_text="", array $a_types_in_block=null, $a_commands_html=null, $a_order_id=null) | |
Render block header. | |
addStandardRow (ilTemplate $a_tpl, $a_html, $a_ref_id=0) | |
Render item row. | |
renderSelectAllBlock (ilTemplate $a_tpl) | |
Render "select all". | |
addSeparatorRow (ilTemplate $a_tpl) | |
Render separator row. | |
resetRowType () | |
Reset internal row type. | |
getDownloadableTypes () | |
Get downloadable repository object types. |
Protected Attributes | |
$enable_manage_select_all | |
$enable_multi_download | |
$active_block_ordering | |
$type_blocks = array() | |
$custom_blocks = array() | |
$items = array() | |
$hidden_items = array() | |
$block_items = array() | |
$details = array() | |
$rendered_blocks = array() | |
$bl_cnt = 0 | |
$cur_row_type | |
$block_pos = array() | |
$block_custom_pos = array() | |
$order_cnt = 0 |
Class ilContainerRenderer.
Definition at line 10 of file class.ilContainerRenderer.php.
ilContainerRenderer::__construct | ( | $a_enable_manage_select_all = false , |
|
$a_enable_multi_download = false , |
|||
$a_active_block_ordering = false , |
|||
array | $a_block_custom_positions = null |
||
) |
Constructor.
bool | $a_enable_manage_select_all | |
bool | $a_enable_multi_download | |
bool | $a_active_block_ordering | |
array | $a_block_custom_positions |
Definition at line 46 of file class.ilContainerRenderer.php.
ilContainerRenderer::addCustomBlock | ( | $a_id, | |
$a_caption, | |||
$a_actions = null |
|||
) |
Add custom block.
mixed | $a_id | |
string | $a_caption | |
string | $a_actions | html snippet |
Definition at line 100 of file class.ilContainerRenderer.php.
References hasCustomBlock().
ilContainerRenderer::addDetailsLevel | ( | $a_level, | |
$a_url, | |||
$a_active = false |
|||
) |
Add details level.
int | $a_level | |
string | $a_url | |
bool | $a_active |
Definition at line 242 of file class.ilContainerRenderer.php.
|
protected |
Render block header.
ilTemplate | $a_tpl | |
string | $a_type | |
string | $a_text | |
array | $a_types_in_block | |
string | $a_commands_html | |
int | $a_order_id |
Definition at line 540 of file class.ilContainerRenderer.php.
References $ilSetting, $lng, getDownloadableTypes(), ilUtil\getImagePath(), ilPlugin\lookupTxt(), ilTemplate\parseCurrentBlock(), renderSelectAllBlock(), resetRowType(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilTemplate\touchBlock().
Referenced by renderHelperGeneric().
ilContainerRenderer::addItemToBlock | ( | $a_block_id, | |
$a_item_type, | |||
$a_item_id, | |||
$a_item_html, | |||
$a_force = false |
|||
) |
Add item to existing block.
mixed | $a_block_id | |
string | $a_item_type | repository object type |
mixed | $a_item_id | |
string | $a_item_html | html snippet |
bool | $a_force | enable multiple rendering |
Definition at line 215 of file class.ilContainerRenderer.php.
References hasItem(), and isValidBlock().
|
protected |
Render separator row.
ilTemplate | $a_tpl |
Definition at line 666 of file class.ilContainerRenderer.php.
References ilTemplate\parseCurrentBlock(), and ilTemplate\setCurrentBlock().
Referenced by getHTML().
|
protected |
Render item row.
ilTemplate | $a_tpl | |
string | $a_html | |
int | $a_ref_id |
Definition at line 619 of file class.ilContainerRenderer.php.
References ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilTemplate\touchBlock().
Referenced by renderHelperGeneric().
ilContainerRenderer::addTypeBlock | ( | $a_type, | |
$a_prefix = null , |
|||
$a_postfix = null |
|||
) |
Add type block.
string | $a_type | repository object type |
string | $a_prefix | html snippet |
string | $a_postfix | html snippet |
Definition at line 67 of file class.ilContainerRenderer.php.
References hasTypeBlock().
|
protected |
Get downloadable repository object types.
Definition at line 686 of file class.ilContainerRenderer.php.
Referenced by addHeaderRow().
ilContainerRenderer::getHTML | ( | ) |
Get rendered html (of all blocks)
Definition at line 282 of file class.ilContainerRenderer.php.
References $valid, addSeparatorRow(), initBlockTemplate(), processBlockPositions(), renderDetails(), renderHelperCustomBlock(), and renderHelperTypeBlock().
ilContainerRenderer::hasCustomBlock | ( | $a_id | ) |
Custom block already exists?
mixede | $a_id |
Definition at line 119 of file class.ilContainerRenderer.php.
Referenced by addCustomBlock(), isValidBlock(), and renderHelperCustomBlock().
ilContainerRenderer::hasItem | ( | $a_id | ) |
Item with id exists?
mixed | $a_id |
Definition at line 193 of file class.ilContainerRenderer.php.
Referenced by addItemToBlock().
ilContainerRenderer::hasTypeBlock | ( | $a_type | ) |
Type block already exists?
string | $a_type | repository object type |
Definition at line 87 of file class.ilContainerRenderer.php.
Referenced by addTypeBlock(), isValidBlock(), and renderHelperTypeBlock().
ilContainerRenderer::hideItem | ( | $a_id | ) |
Mark item id as used, but do not render.
mixed | $a_id |
Definition at line 146 of file class.ilContainerRenderer.php.
|
protected |
Init template.
Definition at line 521 of file class.ilContainerRenderer.php.
Referenced by getHTML(), renderSingleCustomBlock(), and renderSingleTypeBlock().
ilContainerRenderer::isValidBlock | ( | $a_id | ) |
Any block with id exists?
mixed | $a_id |
Definition at line 130 of file class.ilContainerRenderer.php.
References hasCustomBlock(), and hasTypeBlock().
Referenced by addItemToBlock(), processBlockPositions(), and setBlockPosition().
|
protected |
Process block positions.
Definition at line 358 of file class.ilContainerRenderer.php.
References $block_pos, and isValidBlock().
Referenced by getHTML().
ilContainerRenderer::removeItem | ( | $a_id | ) |
Remove item (from any block)
mixed | $a_id |
Definition at line 160 of file class.ilContainerRenderer.php.
References $items.
ilContainerRenderer::renderDetails | ( | ilTemplate | $a_tpl | ) |
Render detail level.
ilTemplate | $a_tpl |
Definition at line 696 of file class.ilContainerRenderer.php.
References $lng, ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().
Referenced by getHTML().
|
protected |
Render custom block.
ilTemplate | $a_block_tpl | |
mixed | $a_block_id | |
bool | $a_is_single |
Definition at line 425 of file class.ilContainerRenderer.php.
References hasCustomBlock(), and renderHelperGeneric().
Referenced by getHTML(), and renderSingleCustomBlock().
|
protected |
Render block.
ilTemplate | $a_block_tpl | |
mixed | $a_block_id | |
array | $a_block | block properties |
bool | $a_is_single |
Definition at line 463 of file class.ilContainerRenderer.php.
References $active_block_ordering, addHeaderRow(), and addStandardRow().
Referenced by renderHelperCustomBlock(), and renderHelperTypeBlock().
|
protected |
Render type block.
ilTemplate | $a_block_tpl | |
string | $a_type | repository object type |
bool | $a_is_single |
Definition at line 442 of file class.ilContainerRenderer.php.
References hasTypeBlock(), and renderHelperGeneric().
Referenced by getHTML(), and renderSingleTypeBlock().
|
protected |
Render "select all".
ilTemplate $lng
Definition at line 649 of file class.ilContainerRenderer.php.
References $lng, ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().
Referenced by addHeaderRow().
ilContainerRenderer::renderSingleCustomBlock | ( | $a_id | ) |
Get rendered html of single custom block.
mixed | $a_id |
Definition at line 338 of file class.ilContainerRenderer.php.
References initBlockTemplate(), and renderHelperCustomBlock().
ilContainerRenderer::renderSingleTypeBlock | ( | $a_type | ) |
Get rendered html of single type block.
string | $a_type | repository object type |
Definition at line 322 of file class.ilContainerRenderer.php.
References initBlockTemplate(), and renderHelperTypeBlock().
ilContainerRenderer::resetDetails | ( | ) |
Reset/remove all detail levels.
Definition at line 253 of file class.ilContainerRenderer.php.
|
protected |
Reset internal row type.
Definition at line 675 of file class.ilContainerRenderer.php.
Referenced by addHeaderRow().
ilContainerRenderer::setBlockPosition | ( | $a_block_id, | |
$a_pos | |||
) |
Set block position.
mixed | $a_block_id | |
int | $a_pos |
Definition at line 269 of file class.ilContainerRenderer.php.
References isValidBlock().
|
protected |
Definition at line 15 of file class.ilContainerRenderer.php.
Referenced by renderHelperGeneric().
|
protected |
Definition at line 27 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 32 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 22 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 31 of file class.ilContainerRenderer.php.
Referenced by processBlockPositions().
|
protected |
Definition at line 28 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 19 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 23 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 13 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 14 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 21 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 20 of file class.ilContainerRenderer.php.
Referenced by removeItem().
|
protected |
Definition at line 33 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 26 of file class.ilContainerRenderer.php.
|
protected |
Definition at line 18 of file class.ilContainerRenderer.php.
const ilContainerRenderer::UNIQUE_SEPARATOR = "-" |
Definition at line 35 of file class.ilContainerRenderer.php.