ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilMultipleNestedOrderingElementsInputGUI Class Reference
+ Inheritance diagram for ilMultipleNestedOrderingElementsInputGUI:
+ Collaboration diagram for ilMultipleNestedOrderingElementsInputGUI:

Public Member Functions

 __construct ($a_title='', $a_postvar='')
 Constructor. More...
 
 setInstanceId ($instanceId)
 
 getInstanceId ()
 
 setInteractionEnabled ($interactionEnabled)
 
 isInteractionEnabled ()
 
 isNestingEnabled ()
 
 setNestingEnabled ($nestingEnabled)
 
 isStylingDisabled ()
 
 setStylingDisabled ($stylingDisabled)
 
 getCssListClass ()
 
 setCssListClass ($cssListClass)
 
 getCssItemClass ()
 
 getCssHandleClass ()
 
 setCssHandleClass ($cssHandleClass)
 
 setCssItemClass ($cssItemClass)
 
 getHtmlListTag ()
 
 setHtmlListTag ($htmlListTag)
 
 getListTpl ()
 
 setListTpl ($listTpl)
 
 render ($a_mode="")
 
 onCheckInput ()
 
 getHTML ()
 
- Public Member Functions inherited from ilIdentifiedMultiValuesInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 getElementAddCmd ()
 
 setElementAddCmd ($elementAddCmd)
 
 getElementRemoveCmd ()
 
 setElementRemoveCmd ($elementRemoveCmd)
 
 getElementMoveUpCommand ()
 
 setElementMoveUpCommand ($elementMoveUpCommand)
 
 getElementMoveDownCommand ()
 
 setElementMoveDownCommand ($elementMoveDownCommand)
 
 setValues ($values)
 
 getValues ()
 
 setValue ($value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setMultiValues (array $values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 setIdentifiedMultiValues ($values)
 
 getIdentifiedMultiValues ()
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 onCheckInput ()
 
 prepareReprintable (assQuestion $question)
 
- Public Member Functions inherited from ilTextInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setValidationFailureMessage ($a_msg)
 Set message string for validation failure. More...
 
 getValidationFailureMessage ()
 
 setValidationRegexp ($a_value)
 Set validation regexp. More...
 
 getValidationRegexp ()
 Get validation regexp. More...
 
 setMaxLength ($a_maxlength)
 Set Max Length. More...
 
 getMaxLength ()
 Get Max Length. More...
 
 setSize ($a_size)
 Set Size. More...
 
 setInlineStyle ($a_style)
 Set inline style. More...
 
 getInlineStyle ()
 Get inline style. More...
 
 setCssClass ($a_class)
 
 getCssClass ()
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getSize ()
 Get Size. More...
 
 setSuffix ($a_value)
 Set suffix. More...
 
 getSuffix ()
 Get suffix. More...
 
 setInputType ($a_type)
 set input type More...
 
 getInputType ()
 get input type More...
 
 setSubmitFormOnEnter ($a_val)
 Set submit form on enter. More...
 
 getSubmitFormOnEnter ()
 Get submit form on enter. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getDataSource ()
 get datasource link for js autocomplete More...
 
 setDataSource ($href, $a_delimiter=null)
 set datasource link for js autocomplete More...
 
 setDataSourceSubmitOnSelection ($a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl ($a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 insert ($a_tpl)
 Insert property html. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
 setDisableHtmlAutoComplete ($autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Data Fields

const HTML_LIST_TAG_UL = 'ul'
 
const HTML_LIST_TAG_OL = 'ol'
 
const CSS_LIST_CLASS = 'dd-list'
 
const CSS_ITEM_CLASS = 'dd-item'
 
const CSS_HANDLE_CLASS = 'dd-handle'
 
const POSTVAR_SUBFIELD_NEST_ELEM = 'content'
 
const POSTVAR_SUBFIELD_NEST_INDENT = 'indentation'
 
const DEFAULT_INSTANCE_ID = 'default'
 
- Data Fields inherited from ilIdentifiedMultiValuesInputGUI
const ELEMENT_DEFAULT_ADD_CMD = 'addElement'
 
const ELEMENT_DEFAULT_REMOVE_CMD = 'removeElement'
 
const ELEMENT_DEFAULT_MOVE_UP_CMD = 'moveUpElement'
 
const ELEMENT_DEFAULT_MOVE_DOWN_CMD = 'moveDownElement'
 

Protected Member Functions

 isStylingEnabled ()
 
 getGlobalTpl ()
 
 initListTemplate ()
 
 fetchListHtml ()
 
 renderListContainer ()
 
 renderListSnippet ()
 
 renderListItem ($value, $identifier, $position)
 
 getItemHtml ($value, $identifier, $position, $itemSubFieldPostVar, $itemSubFieldId)
 
 renderBeginListItem ($identifier)
 
 renderEndListItem ()
 
 renderBeginSubList ()
 
 renderEndSubList ()
 
 getCurrentIndentation ($elementValues, $elementCounter)
 
 getNextIndentation ($elementValues, $elementCounter)
 
 renderMainList ()
 
 renderJsInit ()
 
- Protected Member Functions inherited from ilIdentifiedMultiValuesInputGUI
 getMultiValueSubFieldId ($identifier, $subFieldIndex)
 
 getMultiValuePosIndexedFieldId ($identifier, $positionIndex)
 
 getMultiValuePosIndexedSubFieldId ($identifier, $subFieldIndex, $positionIndex)
 
 getFieldIdFromPostVar ($tempPostVar)
 
 getPostVarSubField ($subFieldIndex)
 
 getMultiValuePostVarSubField ($identifier, $subFieldIndex)
 
 getMultiValuePostVarSubFieldPosIndexed ($identifier, $subFieldIndex, $positionIndex)
 
 getMultiValuePostVarPosIndexed ($identifier, $positionIndex)
 
 getMultiValuePostVar ($identifier)
 
 buildMultiValueSubmitVar ($identifier, $positionIndex, $submitCommand)
 
 setIdentifiedMultiValuesByArray ($a_values)
 
 prepareMultiValuesInput ($values)
 
 prepareMultiValuesSubmit ($values)
 
 getFormValuesManipulators ()
 
 addFormValuesManipulator (ilFormValuesManipulator $manipulator)
 
 getSubFieldCompletedPostVar ($subFieldIndex, $elemPostVar)
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Protected Attributes

 $instanceId = self::DEFAULT_INSTANCE_ID
 
 $interactionEnabled = true
 
 $nestingEnabled = true
 
 $stylingDisabled = false
 
 $listTpl = null
 
 $cssListClass = self::CSS_LIST_CLASS
 
 $cssItemClass = self::CSS_ITEM_CLASS
 
 $cssHandleClass = self::CSS_HANDLE_CLASS
 
 $htmlListTag = self::HTML_LIST_TAG_OL
 
- Protected Attributes inherited from ilIdentifiedMultiValuesInputGUI
 $elementAddCmd = self::ELEMENT_DEFAULT_ADD_CMD
 
 $elementRemoveCmd = self::ELEMENT_DEFAULT_REMOVE_CMD
 
 $elementMoveUpCommand = self::ELEMENT_DEFAULT_MOVE_UP_CMD
 
 $elementMoveDownCommand = self::ELEMENT_DEFAULT_MOVE_DOWN_CMD
 
 $identified_multi_values = array()
 
 $formValuesManipulationChain = array()
 
- Protected Attributes inherited from ilTextInputGUI
 $value
 
 $maxlength = 200
 
 $size = 40
 
 $validationRegexp
 
 $validationFailureMessage = ''
 
 $suffix
 
 $style_css
 
 $css_class
 
 $ajax_datasource
 
 $ajax_datasource_delimiter
 
 $ajax_datasource_commit = FALSE
 
 $ajax_datasource_commit_url
 
 $submit_form_on_enter = false
 
 $autocomplete_disabled = false
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMultipleNestedOrderingElementsInputGUI::__construct (   $a_title = '',
  $a_postvar = '' 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilIdentifiedMultiValuesInputGUI.

Definition at line 45 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

46 {
47 parent::__construct($a_title, $a_postvar);
48
49 require_once 'Services/Form/classes/class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php';
51 $this->addFormValuesManipulator($manipulator);
52 }
addFormValuesManipulator(ilFormValuesManipulator $manipulator)

References ilIdentifiedMultiValuesInputGUI\addFormValuesManipulator().

+ Here is the call graph for this function:

Member Function Documentation

◆ fetchListHtml()

ilMultipleNestedOrderingElementsInputGUI::fetchListHtml ( )
protected

Definition at line 194 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References getListTpl().

Referenced by renderMainList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCssHandleClass()

ilMultipleNestedOrderingElementsInputGUI::getCssHandleClass ( )
Returns
string

Definition at line 126 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References $cssHandleClass.

Referenced by ilAssNestedOrderingElementsInputGUI\__construct(), and renderListItem().

+ Here is the caller graph for this function:

◆ getCssItemClass()

ilMultipleNestedOrderingElementsInputGUI::getCssItemClass ( )

◆ getCssListClass()

ilMultipleNestedOrderingElementsInputGUI::getCssListClass ( )

◆ getCurrentIndentation()

ilMultipleNestedOrderingElementsInputGUI::getCurrentIndentation (   $elementValues,
  $elementCounter 
)
abstractprotected
Parameters
array$elementValues
integer$elementCounter
Returns
integer $currentDepth

Reimplemented in ilAssNestedOrderingElementsInputGUI.

Referenced by renderMainList().

+ Here is the caller graph for this function:

◆ getGlobalTpl()

ilMultipleNestedOrderingElementsInputGUI::getGlobalTpl ( )
protected
Returns
ilTemplate

Definition at line 166 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

167 {
168 return isset($GLOBALS['DIC']) ? $GLOBALS['DIC']['tpl'] : $GLOBALS['tpl'];
169 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $GLOBALS.

Referenced by render().

+ Here is the caller graph for this function:

◆ getHTML()

ilMultipleNestedOrderingElementsInputGUI::getHTML ( )

Definition at line 509 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References render().

+ Here is the call graph for this function:

◆ getHtmlListTag()

ilMultipleNestedOrderingElementsInputGUI::getHtmlListTag ( )
Returns
string

Definition at line 150 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References $htmlListTag.

Referenced by renderBeginSubList(), renderEndSubList(), and renderJsInit().

+ Here is the caller graph for this function:

◆ getInstanceId()

ilMultipleNestedOrderingElementsInputGUI::getInstanceId ( )

Reimplemented in ilAssNestedOrderingElementsInputGUI.

Definition at line 59 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References $instanceId.

Referenced by renderJsInit(), and renderListContainer().

+ Here is the caller graph for this function:

◆ getItemHtml()

ilMultipleNestedOrderingElementsInputGUI::getItemHtml (   $value,
  $identifier,
  $position,
  $itemSubFieldPostVar,
  $itemSubFieldId 
)
abstractprotected
Parameters
$value
$identifier
$position
$itemSubFieldPostVar
$itemSubFieldId
Returns
mixed

Reimplemented in ilAssNestedOrderingElementsInputGUI.

Referenced by renderListItem().

+ Here is the caller graph for this function:

◆ getListTpl()

ilMultipleNestedOrderingElementsInputGUI::getListTpl ( )

◆ getNextIndentation()

ilMultipleNestedOrderingElementsInputGUI::getNextIndentation (   $elementValues,
  $elementCounter 
)
abstractprotected
Parameters
array$elementValues
integer$elementCounter
Returns
integer $nextDepth

Reimplemented in ilAssNestedOrderingElementsInputGUI.

Referenced by renderMainList().

+ Here is the caller graph for this function:

◆ initListTemplate()

ilMultipleNestedOrderingElementsInputGUI::initListTemplate ( )
protected

Definition at line 187 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

188 {
189 $this->setListTpl(
190 new ilTemplate('tpl.prop_nested_ordering_list.html', true, true, 'Services/Form')
191 );
192 }
special template class to simplify handling of ITX/PEAR

References setListTpl().

Referenced by renderMainList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isInteractionEnabled()

ilMultipleNestedOrderingElementsInputGUI::isInteractionEnabled ( )

Definition at line 69 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References $interactionEnabled.

Referenced by render().

+ Here is the caller graph for this function:

◆ isNestingEnabled()

ilMultipleNestedOrderingElementsInputGUI::isNestingEnabled ( )

Definition at line 74 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References $nestingEnabled.

Referenced by renderJsInit(), and renderMainList().

+ Here is the caller graph for this function:

◆ isStylingDisabled()

ilMultipleNestedOrderingElementsInputGUI::isStylingDisabled ( )

Definition at line 84 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References $stylingDisabled.

Referenced by isStylingEnabled().

+ Here is the caller graph for this function:

◆ isStylingEnabled()

ilMultipleNestedOrderingElementsInputGUI::isStylingEnabled ( )
protected

Definition at line 94 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

References isStylingDisabled().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onCheckInput()

ilMultipleNestedOrderingElementsInputGUI::onCheckInput ( )

Reimplemented from ilIdentifiedMultiValuesInputGUI.

Definition at line 504 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

505 {
506 return true;
507 }

◆ render()

ilMultipleNestedOrderingElementsInputGUI::render (   $a_mode = "")

Definition at line 482 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

483 {
484 if( $this->isStylingEnabled() )
485 {
486 $this->getGlobalTpl()->addCss('Services/Form/css/nested_ordering.css');
487 }
488
489 if( $this->isInteractionEnabled() )
490 {
491 require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
492
495
496 $this->getGlobalTpl()->addJavaScript('Services/jQuery/js/jquery.nestable.js');
497
498 return $this->renderMainList() . $this->renderJsInit();
499 }
500
501 return $this->renderMainList();
502 }
static initjQueryUI()
Init jQuery UI (see included_components.txt for included components)
static initjQuery($a_tpl=null)
Init jQuery.

References getGlobalTpl(), iljQueryUtil\initjQuery(), iljQueryUtil\initjQueryUI(), isInteractionEnabled(), isStylingEnabled(), renderJsInit(), and renderMainList().

Referenced by getHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderBeginListItem()

ilMultipleNestedOrderingElementsInputGUI::renderBeginListItem (   $identifier)
protected

Definition at line 240 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

241 {
242 $this->getListTpl()->setCurrentBlock('begin_list_item');
243 $this->getListTpl()->setVariable('LIST_ITEM_ID', $identifier);
244 $this->getListTpl()->setVariable('ILC_ITEM_CSS_CLASS', $this->getCssItemClass());
245 $this->getListTpl()->parseCurrentBlock();
246 $this->renderListSnippet();
247 }

References getCssItemClass(), getListTpl(), and renderListSnippet().

Referenced by renderMainList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderBeginSubList()

ilMultipleNestedOrderingElementsInputGUI::renderBeginSubList ( )
protected

Definition at line 257 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

258 {
259 $this->getListTpl()->setCurrentBlock('begin_sublist');
260 $this->getListTpl()->setVariable('BEGIN_HTML_LIST_TAG', $this->getHtmlListTag());
261 $this->getListTpl()->setVariable('ILC_LIST_CSS_CLASS', $this->getCssListClass());
262 $this->getListTpl()->parseCurrentBlock();
263 $this->renderListSnippet();
264 }

References getCssListClass(), getHtmlListTag(), getListTpl(), and renderListSnippet().

Referenced by renderMainList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderEndListItem()

ilMultipleNestedOrderingElementsInputGUI::renderEndListItem ( )
protected

Definition at line 249 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

250 {
251 $this->getListTpl()->setCurrentBlock('end_list_item');
252 $this->getListTpl()->touchBlock('end_list_item');
253 $this->getListTpl()->parseCurrentBlock();
254 $this->renderListSnippet();
255 }

References getListTpl(), and renderListSnippet().

Referenced by renderMainList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderEndSubList()

ilMultipleNestedOrderingElementsInputGUI::renderEndSubList ( )
protected

Definition at line 266 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

267 {
268 $this->getListTpl()->setCurrentBlock('end_sublist');
269 $this->getListTpl()->setVariable('END_HTML_LIST_TAG', $this->getHtmlListTag());
270 $this->getListTpl()->parseCurrentBlock();
271 $this->renderListSnippet();
272 }

References getHtmlListTag(), getListTpl(), and renderListSnippet().

Referenced by renderMainList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderJsInit()

ilMultipleNestedOrderingElementsInputGUI::renderJsInit ( )
protected

Definition at line 460 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

461 {
462 $jsTpl = new ilTemplate('tpl.prop_nested_ordering_js.html', true, true, 'Services/Form');
463
464 if( !$this->isNestingEnabled() )
465 {
466 $jsTpl->setCurrentBlock('avoid_nesting');
467 $jsTpl->touchBlock('avoid_nesting');
468 $jsTpl->parseCurrentBlock();
469 }
470
471 $jsTpl->setCurrentBlock('nested_ordering_init');
472 $jsTpl->setVariable('INSTANCE_ID', $this->getInstanceId());
473 $jsTpl->setVariable('INDENTATION_POSTVAR', $this->getPostVarSubField('indentation'));
474 $jsTpl->setVariable('HTML_LIST_TAG', $this->getHtmlListTag());
475 $jsTpl->setVariable('CSS_LIST_CLASS', $this->getCssListClass());
476 $jsTpl->setVariable('CSS_ITEM_CLASS', $this->getCssItemClass());
477 $jsTpl->parseCurrentBlock();
478
479 return $jsTpl->get();
480 }

References getCssItemClass(), getCssListClass(), getHtmlListTag(), getInstanceId(), ilIdentifiedMultiValuesInputGUI\getPostVarSubField(), and isNestingEnabled().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderListContainer()

ilMultipleNestedOrderingElementsInputGUI::renderListContainer ( )
protected

Definition at line 199 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

200 {
201 $this->getListTpl()->setCurrentBlock('list_container');
202 $this->getListTpl()->setVariable('INSTANCE_ID', $this->getInstanceId());
203 $this->getListTpl()->parseCurrentBlock();
204 }

References getInstanceId(), and getListTpl().

Referenced by renderMainList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderListItem()

ilMultipleNestedOrderingElementsInputGUI::renderListItem (   $value,
  $identifier,
  $position 
)
protected

Definition at line 212 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

213 {
214 $subPostVar = $this->getMultiValuePostVarSubField($identifier, self::POSTVAR_SUBFIELD_NEST_ELEM);
215 $subFieldId = $this->getMultiValueSubFieldId($identifier, self::POSTVAR_SUBFIELD_NEST_ELEM);
216
217 $this->getListTpl()->setCurrentBlock('item_value');
218
219 $this->getListTpl()->setVariable('ILC_HANDLE_CSS_CLASS', $this->getCssHandleClass());
220
221 $this->getListTpl()->setVariable('LIST_ITEM_VALUE', $this->getItemHtml(
222 $value, $identifier, $position, $subPostVar, $subFieldId
223 ));
224
225 $this->getListTpl()->parseCurrentBlock();
226
227 $this->renderListSnippet();
228 }
getItemHtml($value, $identifier, $position, $itemSubFieldPostVar, $itemSubFieldId)

References ilTextInputGUI\$value, getCssHandleClass(), getItemHtml(), getListTpl(), ilIdentifiedMultiValuesInputGUI\getMultiValuePostVarSubField(), ilIdentifiedMultiValuesInputGUI\getMultiValueSubFieldId(), and renderListSnippet().

Referenced by renderMainList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderListSnippet()

ilMultipleNestedOrderingElementsInputGUI::renderListSnippet ( )
protected

Definition at line 206 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

207 {
208 $this->getListTpl()->setCurrentBlock('list_snippet');
209 $this->getListTpl()->parseCurrentBlock();
210 }

References getListTpl().

Referenced by renderBeginListItem(), renderBeginSubList(), renderEndListItem(), renderEndSubList(), and renderListItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderMainList()

ilMultipleNestedOrderingElementsInputGUI::renderMainList ( )
protected

Definition at line 288 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

289 {
290 $this->initListTemplate();
291 $this->renderBeginSubList();
292
293
294 $values = array_values($this->getIdentifiedMultiValues());
295 $keys = array_keys($this->getIdentifiedMultiValues());
296 $prevIndent = 0;
297
298 foreach($values as $counter => $value)
299 {
300 $identifier = $keys[$counter];
301
302 if( $this->isNestingEnabled() )
303 {
304 $curIndent = $this->getCurrentIndentation($values, $counter);
305 $nextIndent = $this->getNextIndentation($values, $counter);
306 }
307 else
308 {
309 $curIndent = $nextIndent = 0;
310 }
311
312 if($prevIndent == $curIndent)
313 {
314 // pcn = Previous, Current, Next -> Depth
315 // pcn: 000, 001, 110, 220
316 if($curIndent == $nextIndent)
317 {
318 // (1) pcn: 000
319 // echo"(1)";
320 $this->renderBeginListItem($identifier);
321 $this->renderListItem($value, $identifier, $counter);
322 $this->renderEndListItem();
323 }
324 else if($curIndent > $nextIndent)
325 {
326 if($prevIndent == $nextIndent)
327 {
328 // wenn prev = cur ist und cur > next, wie soll prev = next sein !?
329
330 // (8) pcn: 110
331 // echo"(8)";
332 $this->renderBeginListItem($identifier);
333 $this->renderListItem($value, $identifier, $counter);
334 $this->renderEndListItem();
335 $this->renderEndSubList();
336 $this->renderEndListItem();
337 }
338 else if($prevIndent > $nextIndent)
339 {
340 // (12) pcn: 220
341 // echo"(12)";
342 $this->renderBeginListItem($identifier);
343 $this->renderListItem($value, $identifier, $counter);
344
345 for($openlists = $nextIndent; $openlists < $curIndent; $openlists++)
346 {
347 $this->renderEndListItem();
348 $this->renderEndSubList();
349 $this->renderEndListItem();
350 }
351 }
352 }
353 else if($curIndent < $nextIndent)
354 {
355 // (2) pcn: 001
356 // echo"(2)";
357 $this->renderBeginListItem($identifier);
358 $this->renderListItem($value, $identifier, $counter);
359 $this->renderBeginSubList();
360 }
361 }
362 else if($prevIndent > $curIndent)
363 {
364 if($curIndent == $nextIndent)
365 {
366 // (6) pcn: 100
367 // echo"(6)";
368 $this->renderBeginListItem($identifier);
369 $this->renderListItem($value, $identifier, $counter);
370 $this->renderEndListItem();
371 }
372 else if($curIndent > $nextIndent)
373 {
374 // (11) pcn: 210
375 // echo"(11)";
376 $this->renderBeginListItem($identifier);
377 $this->renderListItem($value, $identifier, $counter);
378 $this->renderEndListItem();
379 $this->renderEndSubList();
380 }
381 else if($curIndent < $nextIndent)
382 {
383 if($prevIndent == $nextIndent)
384 {
385 // (7) pcn: 101
386 // echo"(7)";
387 $this->renderBeginListItem($identifier);
388 $this->renderListItem($value, $identifier, $counter);
389 $this->renderBeginSubList();
390 }
391 else if($prevIndent > $nextIndent)
392 {
393 // (10) pcn: 201
394 // echo"(10)";
395 $this->renderBeginListItem($identifier);
396 $this->renderListItem($value, $identifier, $counter);
397 for($openlists = $nextIndent; $openlists < $curIndent; $openlists++)
398 {
399 $this->renderEndSubList();
400 }
401 $this->renderBeginSubList();
402 }
403 }
404 }
405 else if($prevIndent < $curIndent)
406 {
407 if($curIndent == $nextIndent)
408 {
409 // (4) pcn: 011
410 // echo"(4)";
411 $this->renderBeginListItem($identifier);
412 $this->renderListItem($value, $identifier, $counter);
413 $this->renderEndListItem();
414 }
415 else if($curIndent > $nextIndent)
416 {
417 if($prevIndent == $nextIndent)
418 {
419 // (3) pcn: 010,
420 // echo"(3)";
421 $this->renderBeginListItem($identifier);
422 $this->renderListItem($value, $identifier, $counter);
423 $this->renderEndListItem();
424 $this->renderEndSubList();
425 $this->renderEndListItem();
426
427 }
428 else if($prevIndent > $nextIndent)
429 {
430 // (9) pcn: 120
431 // echo"(9)";
432 $this->renderBeginListItem($identifier);
433 $this->renderListItem($value, $identifier, $counter);
434 for($openlists = $nextIndent; $openlists < $curIndent; $openlists++)
435 {
436 $this->renderEndListItem();
437 $this->renderEndSubList();
438 }
439 }
440 }
441 else if($curIndent < $nextIndent)
442 {
443 // (5) pcn: 012
444 // echo"(5)";
445 $this->renderBeginListItem($identifier);
446 $this->renderListItem($value, $identifier, $counter);
447 $this->renderBeginSubList();
448 }
449 }
450
451 $prevIndent = $curIndent;
452 }
453
454 $this->renderEndSubList();
455 $this->renderListContainer();
456
457 return $this->fetchListHtml();
458 }
getNextIndentation($elementValues, $elementCounter)
getCurrentIndentation($elementValues, $elementCounter)
$counter

References $counter, ilTextInputGUI\$value, fetchListHtml(), getCurrentIndentation(), ilIdentifiedMultiValuesInputGUI\getIdentifiedMultiValues(), getNextIndentation(), initListTemplate(), isNestingEnabled(), renderBeginListItem(), renderBeginSubList(), renderEndListItem(), renderEndSubList(), renderListContainer(), and renderListItem().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCssHandleClass()

ilMultipleNestedOrderingElementsInputGUI::setCssHandleClass (   $cssHandleClass)
Parameters
string$cssHandleClass

Definition at line 134 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

135 {
136 $this->cssHandleClass = $cssHandleClass;
137 }

References $cssHandleClass.

Referenced by ilAssNestedOrderingElementsInputGUI\__construct().

+ Here is the caller graph for this function:

◆ setCssItemClass()

ilMultipleNestedOrderingElementsInputGUI::setCssItemClass (   $cssItemClass)
Parameters
string$cssItemClass

Definition at line 142 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

143 {
144 $this->cssItemClass = $cssItemClass;
145 }

References $cssItemClass.

Referenced by ilAssNestedOrderingElementsInputGUI\__construct().

+ Here is the caller graph for this function:

◆ setCssListClass()

ilMultipleNestedOrderingElementsInputGUI::setCssListClass (   $cssListClass)
Parameters
string$cssListClass

Definition at line 110 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

111 {
112 $this->cssListClass = $cssListClass;
113 }

References $cssListClass.

Referenced by ilAssNestedOrderingElementsInputGUI\__construct().

+ Here is the caller graph for this function:

◆ setHtmlListTag()

ilMultipleNestedOrderingElementsInputGUI::setHtmlListTag (   $htmlListTag)
Parameters
string$htmlListTag

Definition at line 158 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

159 {
160 $this->htmlListTag = $htmlListTag;
161 }

References $htmlListTag.

Referenced by ilAssNestedOrderingElementsInputGUI\__construct().

+ Here is the caller graph for this function:

◆ setInstanceId()

ilMultipleNestedOrderingElementsInputGUI::setInstanceId (   $instanceId)

Definition at line 54 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

55 {
56 $this->instanceId = $instanceId;
57 }

References $instanceId.

◆ setInteractionEnabled()

ilMultipleNestedOrderingElementsInputGUI::setInteractionEnabled (   $interactionEnabled)

Definition at line 64 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

65 {
66 $this->interactionEnabled = $interactionEnabled;
67 }

References $interactionEnabled.

◆ setListTpl()

ilMultipleNestedOrderingElementsInputGUI::setListTpl (   $listTpl)
Parameters
ilTemplate$listTpl

Definition at line 182 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

183 {
184 $this->listTpl = $listTpl;
185 }

References $listTpl.

Referenced by initListTemplate().

+ Here is the caller graph for this function:

◆ setNestingEnabled()

ilMultipleNestedOrderingElementsInputGUI::setNestingEnabled (   $nestingEnabled)

Definition at line 79 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

80 {
81 $this->nestingEnabled = $nestingEnabled;
82 }

References $nestingEnabled.

◆ setStylingDisabled()

ilMultipleNestedOrderingElementsInputGUI::setStylingDisabled (   $stylingDisabled)

Definition at line 89 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

90 {
91 $this->stylingDisabled = $stylingDisabled;
92 }

References $stylingDisabled.

Field Documentation

◆ $cssHandleClass

ilMultipleNestedOrderingElementsInputGUI::$cssHandleClass = self::CSS_HANDLE_CLASS
protected

◆ $cssItemClass

ilMultipleNestedOrderingElementsInputGUI::$cssItemClass = self::CSS_ITEM_CLASS
protected

◆ $cssListClass

ilMultipleNestedOrderingElementsInputGUI::$cssListClass = self::CSS_LIST_CLASS
protected

◆ $htmlListTag

ilMultipleNestedOrderingElementsInputGUI::$htmlListTag = self::HTML_LIST_TAG_OL
protected

◆ $instanceId

ilMultipleNestedOrderingElementsInputGUI::$instanceId = self::DEFAULT_INSTANCE_ID
protected

◆ $interactionEnabled

ilMultipleNestedOrderingElementsInputGUI::$interactionEnabled = true
protected

◆ $listTpl

ilMultipleNestedOrderingElementsInputGUI::$listTpl = null
protected

Definition at line 35 of file class.ilMultipleNestedOrderingElementsInputGUI.php.

Referenced by getListTpl(), and setListTpl().

◆ $nestingEnabled

ilMultipleNestedOrderingElementsInputGUI::$nestingEnabled = true
protected

◆ $stylingDisabled

ilMultipleNestedOrderingElementsInputGUI::$stylingDisabled = false
protected

◆ CSS_HANDLE_CLASS

const ilMultipleNestedOrderingElementsInputGUI::CSS_HANDLE_CLASS = 'dd-handle'

◆ CSS_ITEM_CLASS

const ilMultipleNestedOrderingElementsInputGUI::CSS_ITEM_CLASS = 'dd-item'

◆ CSS_LIST_CLASS

const ilMultipleNestedOrderingElementsInputGUI::CSS_LIST_CLASS = 'dd-list'

◆ DEFAULT_INSTANCE_ID

const ilMultipleNestedOrderingElementsInputGUI::DEFAULT_INSTANCE_ID = 'default'

◆ HTML_LIST_TAG_OL

const ilMultipleNestedOrderingElementsInputGUI::HTML_LIST_TAG_OL = 'ol'

◆ HTML_LIST_TAG_UL

const ilMultipleNestedOrderingElementsInputGUI::HTML_LIST_TAG_UL = 'ul'

◆ POSTVAR_SUBFIELD_NEST_ELEM

const ilMultipleNestedOrderingElementsInputGUI::POSTVAR_SUBFIELD_NEST_ELEM = 'content'

◆ POSTVAR_SUBFIELD_NEST_INDENT

const ilMultipleNestedOrderingElementsInputGUI::POSTVAR_SUBFIELD_NEST_INDENT = 'indentation'

The documentation for this class was generated from the following file: