ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilObjStyleSheetGUI Class Reference

Class ilObjStyleSheetGUI. More...

+ Inheritance diagram for ilObjStyleSheetGUI:
+ Collaboration diagram for ilObjStyleSheetGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference)
 
 enableWrite (bool $a_write)
 Enable writing. More...
 
 executeCommand ()
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 createObject ()
 create new object form More...
 
 includeCSS ()
 
 editObject ()
 Edit -> List characteristics. More...
 
 propertiesObject ()
 
 getPropertiesValues ()
 Get current values for properties from. More...
 
 initPropertiesForm (string $a_mode="edit")
 FORM: Init properties form. More...
 
 updateObject ()
 updates object entry in object_data More...
 
 exportStyleObject ()
 
 deleteObject ($a_error=false)
 display deletion confirmation screen More...
 
 cancelDeleteObject ()
 
 confirmedDeleteObject ()
 delete selected style objects More...
 
 saveObject ()
 
 copyStyleObject ()
 
 importStyleObject ()
 Import style sheet. More...
 
 handleImport (\ILIAS\FileUpload\FileUpload $upload, \ILIAS\FileUpload\DTO\UploadResult $result)
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 setTemplatesSubTabs ()
 
 listColorsObject ()
 List colors of style. More...
 
 addColorObject ()
 
 editColorObject ()
 
 initColorForm (string $a_mode="create")
 
 getColorFormValues ()
 Set values for color editing. More...
 
 cancelColorSavingObject ()
 Cancel color saving. More...
 
 saveColorObject ()
 Save color. More...
 
 updateColorObject ()
 Update color. More...
 
 deleteColorConfirmationObject ()
 Delete color confirmation. More...
 
 confirmDeleteColors (array $colors)
 
 cancelColorDeletionObject ()
 Cancel color deletion. More...
 
 deleteColorObject ()
 
 listMediaQueriesObject ()
 
 addMediaQueryObject ()
 
 editMediaQueryObject ()
 
 initMediaQueryForm (string $a_mode="create")
 Init media query form. More...
 
 getMediaQueryFormValues ()
 Set values for media query editing. More...
 
 saveMediaQueryObject ()
 Save media query. More...
 
 updateMediaQueryObject ()
 
 deleteMediaQueryConfirmationObject ()
 
 deleteMediaQueryConfirmation (array $mq_ids)
 
 deleteMediaQueriesObject ()
 
 saveMediaQueryOrderObject ()
 
 listTemplatesObject ()
 List templates. More...
 
 addTemplateObject ()
 
 editTemplateObject ()
 
 getTemplatePreview (string $a_type, int $a_t_id, bool $a_small_mode=false)
 
 initTemplateForm (string $a_mode="create")
 Init table template form. More...
 
 cancelTemplateSavingObject ()
 Cancel color saving. More...
 
 saveTemplateObject ()
 Save table template. More...
 
 updateTemplateObject (bool $a_refresh=false)
 
 displayTemplateEditForm ()
 
 refreshTemplateObject ()
 Refresh table template. More...
 
 getTemplateFormValues ()
 Set values for table template editing. More...
 
 deleteTemplateConfirmationObject ()
 Delete table template confirmation. More...
 
 deleteTemplateConfirmation (array $tids)
 
 cancelTemplateDeletionObject ()
 Cancel table template deletion. More...
 
 deleteTemplateKeepClassesObject ()
 
 deleteTemplateObject ()
 Delete template. More...
 
 generateTemplateObject ()
 
 initTemplateGenerationForm ()
 Init table template generation form. More...
 
 templateGenerationObject ()
 Table template generation. More...
 
 returnToUpperContextObject ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static getStyleExampleHTML (string $a_type, string $a_class)
 Get style example HTML. More...
 
static _getTemplatePreview (ilObjStyleSheet $a_style, string $a_type, int $a_t_id, bool $a_small_mode=false)
 Get table template preview. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

string $cmd_update
 
string $cmd_new_par
 
string $cmd_delete
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 getRenderedCreationFormsHTML (array $forms)
 
 getCreationFormTitle ()
 
 getCreateForm ()
 
 getImportForm ()
 
 getCloneForm ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getColorTable ()
 
 getMediaQueryTable ()
 
 getTemplateTable (string $temp_type)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

Content InternalDomainService $domain
 
ilPropertyFormGUI $form_gui
 
ilPropertyFormGUI $form
 
Content StandardGUIRequest $style_request
 
Content InternalService $service
 
ilHelpGUI $help
 
ilObjectDefinition $obj_definition
 
bool $enable_write = false
 
string $super_type
 
Access StyleAccessManager $access_manager
 
Content CharacteristicManager $characteristic_manager
 
Content ColorManager $color_manager
 
Content ImageManager $image_manager
 
Content InternalGUIService $gui_service
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjStyleSheetGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference 
)

Definition at line 51 of file class.ilObjStyleSheetGUI.php.

55 {
56 global $DIC;
57
58 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
59
60 $this->service = $DIC->contentStyle()
61 ->internal();
62 $this->gui_service = $this->service->gui();
63 $this->help = $this->gui_service->help();
64 $this->lng->loadLanguageModule("style");
65 $this->ctrl->saveParameter($this, array("tag", "style_type", "temp_type"));
66 $this->style_request = $DIC->contentStyle()
67 ->internal()
68 ->gui()
69 ->standardRequest();
70
71 $this->super_type = "";
72 if ($this->style_request->getStyleType() != "") {
74 $this->style_request->getStyleType()
75 );
76 }
77 $this->type = "sty";
78
79 $ref_id = (is_object($this->object))
80 ? $this->object->getRefId()
81 : 0;
82 $style_id = (is_object($this->object))
83 ? $this->object->getId()
84 : 0;
85
86 $this->access_manager = $this->service->domain()->access(
87 $ref_id,
88 $this->user->getId()
89 );
90 $this->characteristic_manager = $this->service->domain()->characteristic(
91 $style_id,
92 $this->access_manager
93 );
94 $this->color_manager = $this->service->domain()->color(
95 $style_id,
96 $this->access_manager
97 );
98 $this->image_manager = $this->service->domain()->image(
99 $style_id,
100 $this->access_manager
101 );
102 $this->domain = $this->service->domain();
103 }
static _getStyleSuperTypeForType(string $a_type)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ilObjectGUI\$ref_id, ILIAS\GlobalScreen\Provider\__construct(), ilObjStyleSheet\_getStyleSuperTypeForType(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getTemplatePreview()

static ilObjStyleSheetGUI::_getTemplatePreview ( ilObjStyleSheet  $a_style,
string  $a_type,
int  $a_t_id,
bool  $a_small_mode = false 
)
static

Get table template preview.

Definition at line 1308 of file class.ilObjStyleSheetGUI.php.

1313 : string {
1314 global $DIC;
1315
1316 $preview_gui = $DIC->contentStyle()->gui()->preview();
1317 return $preview_gui->getTemplatePreview(
1318 $a_style->getId(),
1319 $a_type,
1320 $a_t_id,
1321 $a_small_mode
1322 );
1323 }

Referenced by ILIAS\Style\Content\Template\TemplateTableBuilder\transformRow().

+ Here is the caller graph for this function:

◆ addAdminLocatorItems()

ilObjStyleSheetGUI::addAdminLocatorItems ( bool  $do_not_add_object = false)
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 716 of file class.ilObjStyleSheetGUI.php.

716 : void
717 {
718 $ilLocator = $this->gui_service->locator();
719
720 if ($this->style_request->getAdminMode() == "settings") { // system settings
721 parent::addAdminLocatorItems(true);
722
723 $ilLocator->addItem(
724 $this->lng->txt("obj_stys"),
725 $this->ctrl->getLinkTargetByClass("ilobjstylesettingsgui", "")
726 );
727
728 $ilLocator->addItem(
729 $this->lng->txt("content_styles"),
730 $this->ctrl->getLinkTargetByClass("ilcontentstylesettingsgui", "")
731 );
732
733 if ($this->style_request->getObjId() > 0) {
734 $ilLocator->addItem(
735 $this->object->getTitle(),
736 $this->ctrl->getLinkTarget($this, "edit")
737 );
738 }
739 }
740 }

References ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ addColorObject()

ilObjStyleSheetGUI::addColorObject ( )

Definition at line 817 of file class.ilObjStyleSheetGUI.php.

817 : void
818 {
819 $tpl = $this->gui_service->ui()->mainTemplate();
820
821 $this->initColorForm();
822 $tpl->setContent($this->form_gui->getHTML());
823 }
initColorForm(string $a_mode="create")
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ addMediaQueryObject()

ilObjStyleSheetGUI::addMediaQueryObject ( )

Definition at line 1052 of file class.ilObjStyleSheetGUI.php.

1052 : void
1053 {
1054 $tpl = $this->gui_service->ui()->mainTemplate();
1055
1056 $this->initMediaQueryForm();
1057 $tpl->setContent($this->form_gui->getHTML());
1058 }
initMediaQueryForm(string $a_mode="create")
Init media query form.

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ addTemplateObject()

ilObjStyleSheetGUI::addTemplateObject ( )

Definition at line 1269 of file class.ilObjStyleSheetGUI.php.

1269 : void
1270 {
1271 $tpl = $this->gui_service->ui()->mainTemplate();
1272
1273 $this->initTemplateForm();
1274 $tpl->setContent($this->form_gui->getHTML());
1275 }
initTemplateForm(string $a_mode="create")
Init table template form.

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ cancelColorDeletionObject()

ilObjStyleSheetGUI::cancelColorDeletionObject ( )

Cancel color deletion.

Definition at line 997 of file class.ilObjStyleSheetGUI.php.

997 : void
998 {
999 $ilCtrl = $this->ctrl;
1000 $ilCtrl->redirect($this, "listColors");
1001 }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

◆ cancelColorSavingObject()

ilObjStyleSheetGUI::cancelColorSavingObject ( )

Cancel color saving.

Definition at line 887 of file class.ilObjStyleSheetGUI.php.

887 : void
888 {
889 $ilCtrl = $this->ctrl;
890
891 $ilCtrl->redirect($this, "listColors");
892 }

◆ cancelDeleteObject()

ilObjStyleSheetGUI::cancelDeleteObject ( )

Definition at line 441 of file class.ilObjStyleSheetGUI.php.

441 : void
442 {
443 $this->gui_service->ctrl()->returnToParent($this);
444 }

◆ cancelObject()

ilObjStyleSheetGUI::cancelObject ( )

cancel action and go back to previous page

Reimplemented from ilObjectGUI.

Definition at line 609 of file class.ilObjStyleSheetGUI.php.

609 : void
610 {
612
613 $this->tpl->setOnScreenMessage('info', $lng->txt("msg_cancel"), true);
614 $this->ctrl->returnToParent($this);
615 }
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng

References $lng, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ cancelTemplateDeletionObject()

ilObjStyleSheetGUI::cancelTemplateDeletionObject ( )

Cancel table template deletion.

Definition at line 1562 of file class.ilObjStyleSheetGUI.php.

1562 : void
1563 {
1564 $ilCtrl = $this->ctrl;
1565
1566 $ilCtrl->redirect($this, "listTemplates");
1567 }

◆ cancelTemplateSavingObject()

ilObjStyleSheetGUI::cancelTemplateSavingObject ( )

Cancel color saving.

Definition at line 1379 of file class.ilObjStyleSheetGUI.php.

1379 : void
1380 {
1381 $ilCtrl = $this->ctrl;
1382 $ilCtrl->redirect($this, "listTemplates");
1383 }

◆ confirmDeleteColors()

ilObjStyleSheetGUI::confirmDeleteColors ( array  $colors)

Definition at line 979 of file class.ilObjStyleSheetGUI.php.

979 : void
980 {
981 if (count($colors) === 0) {
982 $this->ctrl->redirect($this, "listColors");
983 return;
984 }
985
986 $this->getColorTable()->renderDeletionConfirmation(
987 $this->lng->txt("sty_confirm_color_deletion"),
988 $this->lng->txt("info_delete_sure"),
989 "deleteColor",
990 array_combine($colors, $colors)
991 );
992 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ confirmedDeleteObject()

ilObjStyleSheetGUI::confirmedDeleteObject ( )

delete selected style objects

Reimplemented from ilObjectGUI.

Definition at line 449 of file class.ilObjStyleSheetGUI.php.

449 : void
450 {
451 $this->object->delete();
452 $this->gui_service->ctrl()->returnToParent($this);
453 }

◆ copyStyleObject()

ilObjStyleSheetGUI::copyStyleObject ( )

Definition at line 511 of file class.ilObjStyleSheetGUI.php.

511 : int
512 {
513 $ctrl = $this->gui_service->ctrl();
514
515 $form = $this->getCloneForm();
516 $form->checkInput();
517 $new_id = 0;
518
519 if ($form->getInput("source_style") > 0) {
520 $style_obj = ilObjectFactory::getInstanceByObjId((int) $form->getInput("source_style"));
521 $new_id = $style_obj->ilClone();
522 }
523
524 // assign style to style sheet folder,
525 // if parent is style sheet folder
526 if ($this->requested_ref_id > 0) {
527 $fold = ilObjectFactory::getInstanceByRefId($this->requested_ref_id);
528 if ($fold->getType() == "stys") {
529 $cont_style_settings = new ilContentStyleSettings();
530 $cont_style_settings->addStyle($new_id);
531 $cont_style_settings->update();
532 ilObjStyleSheet::_writeStandard($new_id, true);
533 $ctrl->returnToParent($this);
534 }
535 }
536 $this->object = new ilObjStyleSheet($new_id);
537
538 return $new_id;
539 }
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
@inheritDoc
Class ilObjStyleSheet.
static _writeStandard(int $a_id, bool $a_std)
Write standard flag.
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References $fold, ilObjStyleSheet\_writeStandard(), ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getInput(), ilObjectFactory\getInstanceByObjId(), and ilObjectFactory\getInstanceByRefId().

+ Here is the call graph for this function:

◆ createObject()

ilObjStyleSheetGUI::createObject ( )

create new object form

Reimplemented from ilObjectGUI.

Definition at line 179 of file class.ilObjStyleSheetGUI.php.

179 : void
180 {
181 $tpl = $this->gui_service->ui()->mainTemplate();
182
183 $ilHelp = $this->help;
184
185 $forms = array();
186
187
188 $ilHelp->setScreenIdComponent("sty");
189 $ilHelp->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, "create");
190
191 $forms[] = $this->getCreateForm();
192 $forms[] = $this->getImportForm();
193 $forms[] = $this->getCloneForm();
194
196 }
const ID_PART_SCREEN
getRenderedCreationFormsHTML(array $forms)

References $help, ilObjectGUI\$tpl, getCloneForm(), getCreateForm(), getImportForm(), getRenderedCreationFormsHTML(), ilHelpGUI\ID_PART_SCREEN, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ deleteColorConfirmationObject()

ilObjStyleSheetGUI::deleteColorConfirmationObject ( )

Delete color confirmation.

Definition at line 954 of file class.ilObjStyleSheetGUI.php.

954 : void
955 {
956 $ilCtrl = $this->ctrl;
957 $tpl = $this->gui_service->ui()->mainTemplate();
959
960 $colors = $this->style_request->getColors();
961 if (count($colors) == 0) {
962 $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
963 $ilCtrl->redirect($this, "listColors");
964 } else {
965 $cgui = new ilConfirmationGUI();
966 $cgui->setFormAction($ilCtrl->getFormAction($this));
967 $cgui->setHeaderText($lng->txt("sty_confirm_color_deletion"));
968 $cgui->setCancel($lng->txt("cancel"), "cancelColorDeletion");
969 $cgui->setConfirm($lng->txt("delete"), "deleteColor");
970
971 foreach ($colors as $c) {
972 $cgui->addItem("color[]", ilLegacyFormElementsUtil::prepareFormOutput($c), $c);
973 }
974
975 $tpl->setContent($cgui->getHTML());
976 }
977 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static prepareFormOutput($a_str, bool $a_strip=false)

References Vendor\Package\$c, $lng, ILIAS\News\Common\Table\$tpl, ilLegacyFormElementsUtil\prepareFormOutput(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ deleteColorObject()

ilObjStyleSheetGUI::deleteColorObject ( )

Definition at line 1003 of file class.ilObjStyleSheetGUI.php.

1003 : void
1004 {
1005 $ilCtrl = $this->ctrl;
1006
1007 $colors = $this->getColorTable()->getItemIds();
1008 if (count($colors) === 0) {
1009 $colors = $this->style_request->getColors();
1010 }
1011 foreach ($colors as $c) {
1012 $this->object->removeColor($c);
1013 }
1014
1015 $ilCtrl->redirect($this, "listColors");
1016 }

References Vendor\Package\$c.

◆ deleteMediaQueriesObject()

ilObjStyleSheetGUI::deleteMediaQueriesObject ( )

Definition at line 1182 of file class.ilObjStyleSheetGUI.php.

1182 : void
1183 {
1184 $ilCtrl = $this->ctrl;
1185
1186 $mq_ids = $this->getMediaQueryTable()->getItemIds();
1187 if (count($mq_ids) === 0) {
1188 $mq_ids = $this->style_request->getMediaQueryIds();
1189 }
1190 if ($this->access_manager->checkWrite()) {
1191 foreach ($mq_ids as $id) {
1192 $this->object->deleteMediaQuery($id);
1193 }
1194 }
1195 $ilCtrl->redirect($this, "listMediaQueries");
1196 }

References $id.

◆ deleteMediaQueryConfirmation()

ilObjStyleSheetGUI::deleteMediaQueryConfirmation ( array  $mq_ids)

Definition at line 1160 of file class.ilObjStyleSheetGUI.php.

1160 : void
1161 {
1162 $ilCtrl = $this->ctrl;
1163 if (count($mq_ids) === 0) {
1164 $ilCtrl->redirect($this, "listMediaQueries");
1165 return;
1166 }
1167
1168 $items = [];
1169 foreach ($mq_ids as $mq_id) {
1170 $media_query = $this->object->getMediaQueryForId($mq_id);
1171 $items[$mq_id] = $media_query["mquery"] ?? "";
1172 }
1173
1174 $this->getMediaQueryTable()->renderDeletionConfirmation(
1175 $this->lng->txt("sty_sure_del_mqueries"),
1176 $this->lng->txt("info_delete_sure"),
1177 "deleteMediaQueries",
1178 $items
1179 );
1180 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ deleteMediaQueryConfirmationObject()

ilObjStyleSheetGUI::deleteMediaQueryConfirmationObject ( )

Definition at line 1155 of file class.ilObjStyleSheetGUI.php.

1155 : void
1156 {
1157 $this->deleteMediaQueryConfirmation($this->style_request->getMediaQueryIds());
1158 }
deleteMediaQueryConfirmation(array $mq_ids)

◆ deleteObject()

ilObjStyleSheetGUI::deleteObject (   $a_error = false)

display deletion confirmation screen

Definition at line 422 of file class.ilObjStyleSheetGUI.php.

422 : void
423 {
424 $tpl = $this->gui_service->ui()->mainTemplate();
425 $ctrl = $this->gui_service->ctrl();
426
427 // display confirmation message
428 $cgui = new ilConfirmationGUI();
429 $cgui->setFormAction($ctrl->getFormAction($this));
430 $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
431 $cgui->setCancel($this->lng->txt("cancel"), "cancelDelete");
432 $cgui->setConfirm($this->lng->txt("confirm"), "confirmedDelete");
433
434 $caption = ilObject::_lookupTitle($this->object->getId());
435
436 $cgui->addItem("id[]", "", $caption);
437
438 $tpl->setContent($cgui->getHTML());
439 }
getFormAction(object $a_gui_obj, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
static _lookupTitle(int $obj_id)

References ILIAS\News\Common\Table\$tpl, ilObject\_lookupTitle(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ deleteTemplateConfirmation()

ilObjStyleSheetGUI::deleteTemplateConfirmation ( array  $tids)

Definition at line 1519 of file class.ilObjStyleSheetGUI.php.

1519 : void
1520 {
1521 $ilCtrl = $this->ctrl;
1522 $tpl = $this->gui_service->ui()->mainTemplate();
1523 $lng = $this->lng;
1524
1525 if (count($tids) == 0) {
1526 $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
1527 $ilCtrl->redirect($this, "listTemplates");
1528 } else {
1529 $cgui = new ilConfirmationGUI();
1530 $cgui->setFormAction($ilCtrl->getFormAction($this));
1531 $cgui->setHeaderText($lng->txt("sty_confirm_template_deletion"));
1532 $cgui->setCancel($lng->txt("cancel"), "cancelTemplateDeletion");
1533 $cgui->setConfirm($lng->txt("sty_del_template"), "deleteTemplate");
1534
1535 foreach ($tids as $tid) {
1536 $classes = $this->object->getTemplateClasses($tid);
1537 $cl_str = "";
1538 $listed = array();
1539 foreach ($classes as $cl) {
1540 if ($cl != "" && !($listed[$cl] ?? false)) {
1541 $cl_str .= '<div>- ' .
1542 $cl . "</div>";
1543 $listed[$cl] = true;
1544 }
1545 }
1546 if ($cl_str != "") {
1547 $cl_str = '<div style="padding-left:30px;" class="small">' .
1548 "<div><i>" . $lng->txt("sty_style_class") . "</i></div>" . $cl_str . "</div>";
1549 }
1550 $cgui->addItem("tid[]", (string) $tid, $this->object->lookupTemplateName($tid) . $cl_str);
1551 }
1552
1553 $cgui->addButton($lng->txt("sty_del_template_keep_classes"), "deleteTemplateKeepClasses");
1554
1555 $tpl->setContent($cgui->getHTML());
1556 }
1557 }

References $lng, ILIAS\News\Common\Table\$tpl, ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ deleteTemplateConfirmationObject()

ilObjStyleSheetGUI::deleteTemplateConfirmationObject ( )

Delete table template confirmation.

Definition at line 1514 of file class.ilObjStyleSheetGUI.php.

1514 : void
1515 {
1516 $this->deleteTemplateConfirmation($this->style_request->getTemplateIds());
1517 }

◆ deleteTemplateKeepClassesObject()

ilObjStyleSheetGUI::deleteTemplateKeepClassesObject ( )

Definition at line 1569 of file class.ilObjStyleSheetGUI.php.

1569 : void
1570 {
1571 $ilCtrl = $this->ctrl;
1572
1573 $tids = $this->style_request->getTemplateIds();
1574 foreach ($tids as $tid) {
1575 $this->object->removeTemplate($tid);
1576 }
1577
1578 $ilCtrl->redirect($this, "listTemplates");
1579 }

◆ deleteTemplateObject()

ilObjStyleSheetGUI::deleteTemplateObject ( )

Delete template.

Exceptions
Content

ContentStyleNoPermissionException

Exceptions
Content

ContentStyleNoPermissionException

Exceptions
ilCtrlException

Definition at line 1587 of file class.ilObjStyleSheetGUI.php.

1587 : void
1588 {
1589 $ilCtrl = $this->ctrl;
1590
1591 $tids = $this->style_request->getTemplateIds();
1592 foreach ($tids as $tid) {
1593 $cls = $this->object->getTemplateClasses($tid);
1594 foreach ($cls as $k => $cls2) {
1595 $ty = $this->object->determineTemplateStyleClassType(
1596 $this->style_request->getTempType(),
1597 $k
1598 );
1599 $this->characteristic_manager->deleteCharacteristic($ty, $cls2);
1600 }
1601 $this->object->removeTemplate($tid);
1602 }
1603
1604 $ilCtrl->redirect($this, "listTemplates");
1605 }

◆ displayTemplateEditForm()

ilObjStyleSheetGUI::displayTemplateEditForm ( )

Definition at line 1464 of file class.ilObjStyleSheetGUI.php.

1464 : void
1465 {
1466 $tpl = $this->gui_service->ui()->mainTemplate();
1467
1468 $a_tpl = new ilTemplate(
1469 "tpl.template_edit.html",
1470 true,
1471 true,
1472 "components/ILIAS/Style/Content"
1473 );
1474 $this->includeCSS();
1475 $a_tpl->setVariable("FORM", $this->form_gui->getHTML());
1476 $a_tpl->setVariable("PREVIEW", $this->getTemplatePreview(
1477 $this->style_request->getTempType(),
1478 $this->style_request->getTemplateId()
1479 ));
1480 $tpl->setContent($a_tpl->get());
1481 }
getTemplatePreview(string $a_type, int $a_t_id, bool $a_small_mode=false)
special template class to simplify handling of ITX/PEAR

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ editColorObject()

ilObjStyleSheetGUI::editColorObject ( )

Definition at line 825 of file class.ilObjStyleSheetGUI.php.

825 : void
826 {
827 $tpl = $this->gui_service->ui()->mainTemplate();
828 $ilCtrl = $this->ctrl;
829
830 $ilCtrl->setParameter($this, "c_name", $this->style_request->getColorName());
831 $this->initColorForm("edit");
832 $this->getColorFormValues();
833 $tpl->setContent($this->form_gui->getHTML());
834 }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
getColorFormValues()
Set values for color editing.

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ editMediaQueryObject()

ilObjStyleSheetGUI::editMediaQueryObject ( )

Definition at line 1060 of file class.ilObjStyleSheetGUI.php.

1060 : void
1061 {
1062 $tpl = $this->gui_service->ui()->mainTemplate();
1063 $ilCtrl = $this->ctrl;
1064
1065 $ilCtrl->setParameter($this, "mq_id", $this->style_request->getMediaQueryId());
1066 $this->initMediaQueryForm("edit");
1067 $this->getMediaQueryFormValues();
1068 $tpl->setContent($this->form_gui->getHTML());
1069 }
getMediaQueryFormValues()
Set values for media query editing.

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ editObject()

ilObjStyleSheetGUI::editObject ( )

Edit -> List characteristics.

Reimplemented from ilObjectGUI.

Definition at line 313 of file class.ilObjStyleSheetGUI.php.

313 : void
314 {
315 $ctrl = $this->gui_service->ctrl();
316 $ctrl->redirectByClass("ilStyleCharacteristicGUI", "listCharacteristics");
317 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

References ilObjectGUI\$ctrl, and ilCtrl\redirectByClass().

Referenced by viewObject().

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

◆ editTemplateObject()

ilObjStyleSheetGUI::editTemplateObject ( )

Definition at line 1277 of file class.ilObjStyleSheetGUI.php.

1277 : void
1278 {
1279 $ilCtrl = $this->ctrl;
1280
1281 $ilCtrl->setParameter(
1282 $this,
1283 "t_id",
1284 $this->style_request->getTemplateId()
1285 );
1286 $this->initTemplateForm("edit");
1287 $this->getTemplateFormValues();
1288
1289 $this->displayTemplateEditForm();
1290 }
getTemplateFormValues()
Set values for table template editing.

◆ enableWrite()

ilObjStyleSheetGUI::enableWrite ( bool  $a_write)

Enable writing.

Definition at line 108 of file class.ilObjStyleSheetGUI.php.

108 : void
109 {
110 $this->access_manager->enableWrite($a_write);
111 }

◆ executeCommand()

ilObjStyleSheetGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 113 of file class.ilObjStyleSheetGUI.php.

113 : void
114 {
115 $tabs = $this->gui_service->tabs();
116 $ctrl = $this->gui_service->ctrl();
117
118 $next_class = $ctrl->getNextClass($this);
119 $cmd = $ctrl->getCmd("edit");
120
121 // #9440/#9489: prepareOutput will fail if not set properly
122 if (!$this->object || $cmd == "create") {
123 $this->setCreationMode();
124 }
125
126 switch ($next_class) {
127 case "ilexportgui":
128 $this->prepareOutput();
129 $exp_gui = new ilExportGUI($this);
130 $exp_gui->addFormat("xml");
131 $ctrl->forwardCommand($exp_gui);
132 break;
133
134 case "ilstylecharacteristicgui":
135 $this->prepareOutput();
136 $this->includeCSS();
137 $tabs->activateTab("sty_style_chars");
138 $gui = $this->gui_service->characteristic()->ilStyleCharacteristicGUI(
139 $this->getStyleSheet(),
140 $this->super_type,
141 $this->access_manager,
142 $this->characteristic_manager,
143 $this->image_manager
144 );
145 $ctrl->forwardCommand($gui);
146 break;
147
148 case "ilcontentstyleimagegui":
149 $this->prepareOutput();
150 $this->includeCSS();
151 $tabs->activateTab("sty_images");
152 $gui = $this->gui_service->image()->ilContentStyleImageGUI(
153 $this->access_manager,
154 $this->image_manager
155 );
156 $ctrl->forwardCommand($gui);
157 break;
158
159 default:
160 $this->prepareOutput();
161 $cmd .= "Object";
162 $this->$cmd();
163 break;
164 }
165 }
getNextClass($a_gui_class=null)
@inheritDoc
forwardCommand(object $a_gui_object)
@inheritDoc
getCmd(?string $fallback_command=null)
@inheritDoc
Export User Interface Class.
setCreationMode(bool $mode=true)
If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode...
prepareOutput(bool $show_sub_objects=true)

References ilObjectGUI\$ctrl, ilCtrl\forwardCommand(), ilCtrl\getCmd(), ilCtrl\getNextClass(), includeCSS(), ilObjectGUI\prepareOutput(), and ilObjectGUI\setCreationMode().

+ Here is the call graph for this function:

◆ exportStyleObject()

ilObjStyleSheetGUI::exportStyleObject ( )

Definition at line 411 of file class.ilObjStyleSheetGUI.php.

411 : void
412 {
413 $exp = new ilExport();
414 $r = $exp->exportObject($this->object->getType(), $this->object->getId());
415
416 ilFileDelivery::deliverFileLegacy($r["directory"] . "/" . $r["file"], $r["file"], '', false, true);
417 }
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)

References ilFileDelivery\deliverFileLegacy(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ generateTemplateObject()

ilObjStyleSheetGUI::generateTemplateObject ( )

Definition at line 1607 of file class.ilObjStyleSheetGUI.php.

1607 : void
1608 {
1609 $tpl = $this->gui_service->ui()->mainTemplate();
1610
1612 $tpl->setContent($this->form_gui->getHTML());
1613 }
initTemplateGenerationForm()
Init table template generation form.

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjStyleSheetGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 617 of file class.ilObjStyleSheetGUI.php.

617 : void
618 {
619 $this->getTabs();
620 }
getTabs()
@abstract overwrite in derived GUI class of your object type

◆ getCloneForm()

ilObjStyleSheetGUI::getCloneForm ( )
protected

Definition at line 285 of file class.ilObjStyleSheetGUI.php.

286 {
288 $form = new ilPropertyFormGUI();
290 $form->setTitle($this->lng->txt("sty_copy_other_stylesheet"));
291
292 // source
293 $ti = new ilSelectInputGUI($this->lng->txt("sty_source"), "source_style");
294 $ti->setRequired(true);
296 $form->addItem($ti);
297
298 $form->addCommandButton("copyStyle", $this->lng->txt("copy"));
299 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
300 return $form;
301 }
setFormAction(string $a_formaction)
static _getClonableContentStyles()
Get all clonable styles (active standard styles and individual learning module styles with write perm...
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
This class represents a selection list property in a property form.

References ilObjectGUI\$ctrl, $form, ilObjStyleSheet\_getClonableContentStyles(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilCtrl\getFormAction(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by createObject().

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

◆ getColorFormValues()

ilObjStyleSheetGUI::getColorFormValues ( )

Set values for color editing.

Definition at line 874 of file class.ilObjStyleSheetGUI.php.

874 : void
875 {
876 $c_name = $this->style_request->getColorName();
877 if ($c_name != "") {
878 $values["color_name"] = $c_name;
879 $values["color_code"] = $this->object->getColorCodeForName($c_name);
880 $this->form_gui->setValuesByArray($values);
881 }
882 }

◆ getColorTable()

ilObjStyleSheetGUI::getColorTable ( )
protected

Definition at line 807 of file class.ilObjStyleSheetGUI.php.

808 {
809 return $this->gui_service->colorTableBuilder(
810 $this->getStyleSheet(),
811 $this->access_manager,
812 $this,
813 "listColors"
814 )->getTable();
815 }

References ILIAS\Repository\Table\TableAdapterGUI\getTable().

+ Here is the call graph for this function:

◆ getCreateForm()

ilObjStyleSheetGUI::getCreateForm ( )
protected

Definition at line 243 of file class.ilObjStyleSheetGUI.php.

244 {
246 $form = new ilPropertyFormGUI();
248 $form->setTitle($this->lng->txt("sty_create_new_stylesheet"));
249
250 // title
251 $ti = new ilTextInputGUI($this->lng->txt("title"), "style_title");
252 $ti->setMaxLength(128);
253 $ti->setSize(40);
254 $ti->setRequired(true);
255 $form->addItem($ti);
256
257 // description
258 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description");
259 $ta->setCols(40);
260 $ta->setRows(2);
261 $form->addItem($ta);
262
263 $form->addCommandButton("save", $this->lng->txt("save"));
264 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
265 return $form;
266 }
This class represents a text area property in a property form.
This class represents a text property in a property form.

References ilObjectGUI\$ctrl, $form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilCtrl\getFormAction(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by createObject().

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

◆ getCreationFormTitle()

ilObjStyleSheetGUI::getCreationFormTitle ( )
protected

Reimplemented from ilObjectGUI.

Definition at line 237 of file class.ilObjStyleSheetGUI.php.

237 : string
238 {
239 return $this->lng->txt("sty_create_new_stylesheet");
240 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getImportForm()

ilObjStyleSheetGUI::getImportForm ( )
protected

Definition at line 268 of file class.ilObjStyleSheetGUI.php.

269 {
271 $form = new ilPropertyFormGUI();
273 $form->setTitle($this->lng->txt("sty_import_stylesheet"));
274
275 // title
276 $ti = new ilFileInputGUI($this->lng->txt("import_file"), "importfile");
277 $ti->setRequired(true);
278 $form->addItem($ti);
279
280 $form->addCommandButton("importStyle", $this->lng->txt("import"));
281 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
282 return $form;
283 }
This class represents a file property in a property form.

References ilObjectGUI\$ctrl, $form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilCtrl\getFormAction(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by createObject().

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

◆ getMediaQueryFormValues()

ilObjStyleSheetGUI::getMediaQueryFormValues ( )

Set values for media query editing.

Definition at line 1104 of file class.ilObjStyleSheetGUI.php.

1104 : void
1105 {
1106 $values = [];
1107 if ($this->style_request->getMediaQueryId() > 0) {
1108 foreach ($this->object->getMediaQueries() as $mq) {
1109 if ($mq["id"] == $this->style_request->getMediaQueryId()) {
1110 $values["mquery"] = $mq["mquery"];
1111 }
1112 }
1113 $this->form_gui->setValuesByArray($values);
1114 }
1115 }

References ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getMediaQueryTable()

ilObjStyleSheetGUI::getMediaQueryTable ( )
protected

Definition at line 1042 of file class.ilObjStyleSheetGUI.php.

1043 {
1044 return $this->gui_service->mediaQueryTableBuilder(
1045 $this->getStyleSheet(),
1046 $this->access_manager,
1047 $this,
1048 "listMediaQueries"
1049 )->getTable();
1050 }

References ILIAS\Repository\Table\TableAdapterGUI\getTable().

+ Here is the call graph for this function:

◆ getPropertiesValues()

ilObjStyleSheetGUI::getPropertiesValues ( )

Get current values for properties from.

Definition at line 332 of file class.ilObjStyleSheetGUI.php.

332 : void
333 {
334 $values = array();
335
336 $values["style_title"] = $this->object->getTitle();
337 $values["style_description"] = $this->object->getDescription();
338 $values["disable_auto_margins"] = (int) $this->object->lookupStyleSetting("disable_auto_margins");
339
340 $this->form->setValuesByArray($values);
341 }
form(?array $class_path, string $cmd, string $submit_caption="")

References ILIAS\Repository\form(), ILIAS\Repository\int(), and ILIAS\Repository\object().

Referenced by propertiesObject().

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

◆ getRenderedCreationFormsHTML()

ilObjStyleSheetGUI::getRenderedCreationFormsHTML ( array  $forms)
protected

Definition at line 198 of file class.ilObjStyleSheetGUI.php.

198 : string
199 {
200 // #13168- sanity check
201 foreach ($forms as $id => $form) {
202 if (!$form instanceof ilPropertyFormGUI) {
203 unset($forms[$id]);
204 }
205 }
206
207 $acc = new ilAccordionGUI();
208 $acc->setBehaviour(ilAccordionGUI::FIRST_OPEN);
209 $cnt = 1;
210 foreach ($forms as $form_type => $cf) {
211 $htpl = new ilTemplate("tpl.creation_acc_head.html", true, true, "components/ILIAS/ILIASObject");
212
213 // using custom form titles (used for repository plugins)
214 $form_title = "";
215 if (method_exists($this, "getCreationFormTitle")) {
216 //$form_title = $this->getCreationFormTitle($form_type);
217 }
218 if (!$form_title) {
219 $form_title = $cf->getTitle();
220 }
221
222 // move title from form to accordion
223 $htpl->setVariable("TITLE", $this->lng->txt("option") . " " . $cnt . ": " . $form_title);
224 $cf->setTitle('');
225 $cf->setTitleIcon('');
226 $cf->setTableWidth("100%");
227
228 $acc->addItem($htpl->get(), $cf->getHTML());
229
230 $cnt++;
231 }
232
233 return "<div class='ilCreationFormSection'>" . $acc->getHTML() . "</div>";
234 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $form, ilObjectGUI\$id, ilAccordionGUI\FIRST_OPEN, and ILIAS\Repository\lng().

Referenced by createObject().

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

◆ getStyleExampleHTML()

static ilObjStyleSheetGUI::getStyleExampleHTML ( string  $a_type,
string  $a_class 
)
static

Get style example HTML.

Definition at line 745 of file class.ilObjStyleSheetGUI.php.

748 : string {
749 global $DIC;
750
751 $lng = $DIC->language();
752
753 $c = explode(":", $a_class);
754 $a_class = $c[0];
755
756 $ex_tpl = new ilTemplate("tpl.style_example.html", true, true, "components/ILIAS/Style/Content");
757
758 if ($ex_tpl->blockExists("Example_" . $a_type)) {
759 $ex_tpl->setCurrentBlock("Example_" . $a_type);
760 } else {
761 $ex_tpl->setCurrentBlock("Example_default");
762 }
763 $ex_tpl->setVariable("EX_CLASS", "ilc_" . $a_type . "_" . $a_class);
764 $ex_tpl->setVariable("EX_TEXT", "ABC abc 123");
765 if (in_array($a_type, array("media_cont", "qimg"))) {
766 //
767 }
768 if (in_array($a_type, array("table", "table_caption"))) {
769 $ex_tpl->setVariable("TXT_CAPTION", $lng->txt("sty_caption"));
770 }
771 if (in_array($a_class, array("OrderListItemHorizontal", "OrderListHorizontal"))) {
772 $ex_tpl->setVariable("HOR", "Horizontal");
773 }
774 $ex_tpl->parseCurrentBlock();
775
776 return $ex_tpl->get();
777 }

Referenced by ilStyleCharacteristicGUI\outputTagStyleEditScreen(), and ILIAS\Style\Content\Characteristic\CharacteristicTableBuilder\transformRow().

+ Here is the caller graph for this function:

◆ getTabs()

ilObjStyleSheetGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Definition at line 622 of file class.ilObjStyleSheetGUI.php.

622 : void
623 {
625 $ilHelp = $this->help;
626 $tabs = $this->gui_service->tabs();
627 $ilHelp->setScreenIdComponent("sty");
628 // back to upper context
629 $tabs->setBackTarget(
630 $lng->txt("back"),
631 $this->ctrl->getLinkTarget($this, "returnToUpperContext")
632 );
633
634 // style classes
635 $tabs->addTarget(
636 "sty_style_chars",
637 $this->ctrl->getLinkTarget($this, "edit"),
638 array("edit", ""),
639 get_class($this)
640 );
641
642 // colors
643 $tabs->addTarget(
644 "sty_colors",
645 $this->ctrl->getLinkTarget($this, "listColors"),
646 "listColors",
647 get_class($this)
648 );
649
650 // images
651 $tabs->addTarget(
652 "sty_images",
653 $this->ctrl->getLinkTargetByClass("ilContentStyleImageGUI", ""),
654 "",
655 "ilContentStyleImageGUI"
656 );
657
658 // media queries
659 $tabs->addTarget(
660 "sty_media_queries",
661 $this->ctrl->getLinkTarget($this, "listMediaQueries"),
662 "listMediaQueries",
663 get_class($this)
664 );
665
666
667 // table templates
668 $tabs->addTarget(
669 "sty_templates",
670 $this->ctrl->getLinkTarget($this, "listTemplates"),
671 "listTemplates",
672 get_class($this)
673 );
674
675 // settings
676 $tabs->addTarget(
677 "settings",
678 $this->ctrl->getLinkTarget($this, "properties"),
679 "properties",
680 get_class($this)
681 );
682
683 // export
684 $tabs->addTarget(
685 "export",
686 $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
687 "",
688 "ilexportgui"
689 );
690 }
setScreenIdComponent(string $a_comp)

References $lng, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getTemplateFormValues()

ilObjStyleSheetGUI::getTemplateFormValues ( )

Set values for table template editing.

Definition at line 1494 of file class.ilObjStyleSheetGUI.php.

1494 : void
1495 {
1496 $t_id = $this->style_request->getTemplateId();
1497 if ($t_id > 0) {
1498 $t = $this->object->getTemplate($t_id);
1499
1500 $values["name"] = $t["name"];
1502 $this->style_request->getTempType()
1503 );
1504 foreach ($scs as $k => $type) {
1505 $values[$k . "_class"] = $t["classes"][$k] ?? "";
1506 }
1507 $this->form_gui->setValuesByArray($values);
1508 }
1509 }
static _getTemplateClassTypes(string $a_template_type="")
Get template class types.

References ilObjStyleSheet\_getTemplateClassTypes().

+ Here is the call graph for this function:

◆ getTemplatePreview()

ilObjStyleSheetGUI::getTemplatePreview ( string  $a_type,
int  $a_t_id,
bool  $a_small_mode = false 
)

Definition at line 1292 of file class.ilObjStyleSheetGUI.php.

1296 : string {
1297 return $this->_getTemplatePreview(
1298 $this->getStyleSheet(),
1299 $a_type,
1300 $a_t_id,
1301 $a_small_mode
1302 );
1303 }
static _getTemplatePreview(ilObjStyleSheet $a_style, string $a_type, int $a_t_id, bool $a_small_mode=false)
Get table template preview.

◆ getTemplateTable()

ilObjStyleSheetGUI::getTemplateTable ( string  $temp_type)
protected

Definition at line 1257 of file class.ilObjStyleSheetGUI.php.

1260 return $this->gui_service->templateTableBuilder(
1261 $this->getStyleSheet(),
1262 $temp_type,
1263 $this->access_manager,
1264 $this,
1265 "listTemplates"
1266 )->getTable();
1267 }

◆ handleImport()

ilObjStyleSheetGUI::handleImport ( \ILIAS\FileUpload\FileUpload  $upload,
\ILIAS\FileUpload\DTO\UploadResult  $result 
)

Definition at line 593 of file class.ilObjStyleSheetGUI.php.

597 $new_id = $this->domain->style(0)->importFromUploadResult(
598 $result
599 );
600 return new \ILIAS\FileUpload\Handler\BasicHandlerResult(
601 'obj_id',
602 \ILIAS\FileUpload\Handler\HandlerResult::STATUS_OK,
603 (string) $new_id,
604 ''
605 );
606 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

◆ importStyleObject()

ilObjStyleSheetGUI::importStyleObject ( )

Import style sheet.

Definition at line 544 of file class.ilObjStyleSheetGUI.php.

544 : int
545 {
546 $newObj = null;
547 // check file
548 $source = $_FILES["importfile"]["tmp_name"];
549 if (($source == 'none') || (!$source)) {
550 $this->ilias->raiseError("No file selected!", $this->ilias->error_obj->MESSAGE);
551 }
552
553 // check correct file type
554 $info = pathinfo($_FILES["importfile"]["name"]);
555 if (strtolower($info["extension"]) != "zip" && strtolower($info["extension"]) != "xml") {
556 $this->ilias->raiseError("File must be a zip or xml file!", $this->ilias->error_obj->MESSAGE);
557 }
558
559 // new import
560 $fname = explode("_", $_FILES["importfile"]["name"]);
561 if (strtolower($info["extension"]) == "zip" && $fname[4] == "sty") {
562 $imp = new ilImport();
563 $new_id = $imp->importObject(
564 null,
565 $_FILES["importfile"]["tmp_name"],
566 $_FILES["importfile"]["name"],
567 "sty"
568 );
569 if ($new_id > 0) {
570 $newObj = ilObjectFactory::getInstanceByObjId($new_id);
571 }
572 } else { // old import
573 $newObj = new ilObjStyleSheet();
574 $newObj->import($_FILES["importfile"]);
575 }
576
577 // assign style to style sheet folder,
578 // if parent is style sheet folder
579 if ($this->requested_ref_id > 0) {
580 $fold = ilObjectFactory::getInstanceByRefId($this->requested_ref_id);
581 if ($fold->getType() == "stys") {
582 $cont_style_settings = new ilContentStyleSettings();
583 $cont_style_settings->addStyle($newObj->getId());
584 $cont_style_settings->update();
585 ilObjStyleSheet::_writeStandard($newObj->getId(), true);
586 $this->ctrl->returnToParent($this);
587 }
588 }
589 $this->object = $newObj;
590 return $newObj->getId();
591 }
Import class.
$info
Definition: entry_point.php:21
Class ilObjForumAdministration.

References $fold, $info, ilObjStyleSheet\_writeStandard(), ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByObjId(), and ilObjectFactory\getInstanceByRefId().

+ Here is the call graph for this function:

◆ includeCSS()

ilObjStyleSheetGUI::includeCSS ( )

Definition at line 303 of file class.ilObjStyleSheetGUI.php.

303 : void
304 {
305 $tpl = $this->gui_service->ui()->mainTemplate();
307 }
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.

References ilObjectGUI\$tpl, ILIAS\UICore\GlobalTemplate\addCss(), ilObjStyleSheet\getContentStylePath(), and ILIAS\Repository\object().

Referenced by executeCommand().

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

◆ initColorForm()

ilObjStyleSheetGUI::initColorForm ( string  $a_mode = "create")

Definition at line 837 of file class.ilObjStyleSheetGUI.php.

839 : void {
841 $ilCtrl = $this->ctrl;
842
843 $this->form_gui = new ilPropertyFormGUI();
844
845 $this->form_gui->setTitle($lng->txt("sty_add_color"));
846
847 // name
848 $name_input = new ilRegExpInputGUI($lng->txt("sty_color_name"), "color_name");
849 $name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
850 $name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include") . " A-Z, a-z, 1-9");
851 $name_input->setRequired(true);
852 $name_input->setSize(15);
853 $name_input->setMaxLength(15);
854 $this->form_gui->addItem($name_input);
855
856 // code
857 $color_input = new ilColorPickerInputGUI($lng->txt("sty_color_code"), "color_code");
858 $color_input->setRequired(true);
859 $color_input->setDefaultColor("");
860 $this->form_gui->addItem($color_input);
861
862 if ($a_mode == "create") {
863 $this->form_gui->addCommandButton("saveColor", $lng->txt("save"));
864 } else {
865 $this->form_gui->addCommandButton("updateColor", $lng->txt("save"));
866 }
867 $this->form_gui->addCommandButton("cancelColorSaving", $lng->txt("cancel"));
868 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
869 }
Color picker form for selecting color hexcodes using yui library.
This class represents a regular expression input property in a property form.

◆ initMediaQueryForm()

ilObjStyleSheetGUI::initMediaQueryForm ( string  $a_mode = "create")

Init media query form.

Definition at line 1075 of file class.ilObjStyleSheetGUI.php.

1077 : void {
1078 $lng = $this->lng;
1079 $ilCtrl = $this->ctrl;
1080
1081 $this->form_gui = new ilPropertyFormGUI();
1082
1083 $this->form_gui->setTitle($lng->txt("sty_add_media_query"));
1084
1085 // media query
1086 $ti = new ilTextInputGUI("@media", "mquery");
1087 $ti->setMaxLength(2000);
1088 $ti->setInfo($lng->txt("sty_add_media_query_info"));
1089 $this->form_gui->addItem($ti);
1090
1091
1092 if ($a_mode == "create") {
1093 $this->form_gui->addCommandButton("saveMediaQuery", $lng->txt("save"));
1094 } else {
1095 $this->form_gui->addCommandButton("updateMediaQuery", $lng->txt("save"));
1096 }
1097 $this->form_gui->addCommandButton("listMediaQueries", $lng->txt("cancel"));
1098 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1099 }

◆ initPropertiesForm()

ilObjStyleSheetGUI::initPropertiesForm ( string  $a_mode = "edit")

FORM: Init properties form.

Definition at line 346 of file class.ilObjStyleSheetGUI.php.

348 : void {
349 $ctrl = $this->gui_service->ctrl();
351
352 $this->form = new ilPropertyFormGUI();
353
354 // title
355 $ti = new ilTextInputGUI($this->lng->txt("title"), "style_title");
356 $ti->setMaxLength(128);
357 $ti->setSize(40);
358 $ti->setRequired(true);
359 $this->form->addItem($ti);
360
361 // description
362 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description");
363 //$ta->setCols();
364 //$ta->setRows();
365 $this->form->addItem($ta);
366
367 // disable automatic margins for left/right alignment
368 $cb = new ilCheckboxInputGUI($this->lng->txt("sty_disable_auto_margins"), "disable_auto_margins");
369 $cb->setInfo($this->lng->txt("sty_disable_auto_margins_info"));
370 $this->form->addItem($cb);
371
372 // save and cancel commands
373
374 if ($a_mode == "create") {
375 $this->form->addCommandButton("save", $lng->txt("save"));
376 $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
377 } else {
378 if ($this->access_manager->checkWrite()) {
379 $this->form->addCommandButton("update", $lng->txt("save"));
380 }
381 }
382
383 $this->form->setTitle($lng->txt("edit_stylesheet"));
384 $this->form->setFormAction($ctrl->getFormAction($this));
385 }
This class represents a checkbox property in a property form.

Referenced by propertiesObject().

+ Here is the caller graph for this function:

◆ initTemplateForm()

ilObjStyleSheetGUI::initTemplateForm ( string  $a_mode = "create")

Init table template form.

Definition at line 1328 of file class.ilObjStyleSheetGUI.php.

1328 : void
1329 {
1330 $lng = $this->lng;
1331 $ilCtrl = $this->ctrl;
1332
1333 $this->form_gui = new ilPropertyFormGUI();
1334
1335 if ($a_mode == "create") {
1336 $this->form_gui->setTitle($lng->txt("sty_add_template"));
1337 } else {
1338 $this->form_gui->setTitle($lng->txt("sty_edit_template"));
1339 }
1340
1341 // name
1342 $name_input = new ilRegExpInputGUI($lng->txt("sty_template_name"), "name");
1343 $name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
1344 $name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include") . " A-Z, a-z, 1-9");
1345 $name_input->setRequired(true);
1346 $name_input->setSize(30);
1347 $name_input->setMaxLength(30);
1348 $this->form_gui->addItem($name_input);
1349
1350 // template style classes
1352 $this->style_request->getTempType()
1353 );
1354
1355 foreach ($scs as $sc => $st) {
1356 $sc_input = new ilSelectInputGUI($lng->txt("sty_" . $sc . "_class"), $sc . "_class");
1357 $chars = $this->object->getCharacteristics($st);
1358 $options = array("" => "");
1359 foreach ($chars as $char) {
1360 $options[$char] = $char;
1361 }
1362 $sc_input->setOptions($options);
1363 $this->form_gui->addItem($sc_input);
1364 }
1365
1366 if ($a_mode == "create") {
1367 $this->form_gui->addCommandButton("saveTemplate", $lng->txt("save"));
1368 } else {
1369 $this->form_gui->addCommandButton("refreshTemplate", $lng->txt("save_refresh"));
1370 $this->form_gui->addCommandButton("updateTemplate", $lng->txt("save_return"));
1371 }
1372 $this->form_gui->addCommandButton("cancelTemplateSaving", $lng->txt("cancel"));
1373 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1374 }

References $lng, ILIAS\UI\Implementation\Component\Input\Field\$options, and ilObjStyleSheet\_getTemplateClassTypes().

+ Here is the call graph for this function:

◆ initTemplateGenerationForm()

ilObjStyleSheetGUI::initTemplateGenerationForm ( )

Init table template generation form.

Definition at line 1618 of file class.ilObjStyleSheetGUI.php.

1618 : void
1619 {
1620 $lng = $this->lng;
1621 $ilCtrl = $this->ctrl;
1622
1623 $this->form_gui = new ilPropertyFormGUI();
1624
1625 $this->form_gui->setTitle($lng->txt("sty_generate_template"));
1626
1627 // name
1628 $name_input = new ilRegExpInputGUI($lng->txt("sty_template_name"), "name");
1629 $name_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*$/");
1630 $name_input->setNoMatchMessage($lng->txt("sty_msg_color_must_only_include") . " A-Z, a-z, 1-9");
1631 $name_input->setRequired(true);
1632 $name_input->setSize(30);
1633 $name_input->setMaxLength(30);
1634 $this->form_gui->addItem($name_input);
1635
1636 // basic layout
1637 $bl_input = new ilSelectInputGUI($lng->txt("sty_template_layout"), "layout");
1638 $options = array(
1639 "coloredZebra" => $lng->txt("sty_table_template_colored_zebra"),
1640 "bwZebra" => $lng->txt("sty_table_template_bw_zebra"),
1641 "noZebra" => $lng->txt("sty_table_template_no_zebra")
1642 );
1643 $bl_input->setOptions($options);
1644 $this->form_gui->addItem($bl_input);
1645
1646 // top bottom padding
1647 $num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_top_bottom_padding"), "tb_padding");
1648 $num_input->setAllowPercentage(false);
1649 $num_input->setValue("3px");
1650 $this->form_gui->addItem($num_input);
1651
1652 // left right padding
1653 $num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_left_right_padding"), "lr_padding");
1654 $num_input->setAllowPercentage(false);
1655 $num_input->setValue("10px");
1656 $this->form_gui->addItem($num_input);
1657
1658 // base color
1659 $bc_input = new ilSelectInputGUI($lng->txt("sty_base_color"), "base_color");
1660 $cs = $this->object->getColors();
1661 $options = array();
1662 foreach ($cs as $c) {
1663 $options[$c["name"]] = $c["name"];
1664 }
1665 $bc_input->setOptions($options);
1666 $this->form_gui->addItem($bc_input);
1667
1668 // Lightness Settings
1669 $lss = array("border" => 90, "header_text" => 70, "header_bg" => 0,
1670 "cell1_text" => -60, "cell1_bg" => 90, "cell2_text" => -60, "cell2_bg" => 75);
1671 foreach ($lss as $ls => $v) {
1672 $l_input = new ilNumberInputGUI($lng->txt("sty_lightness_" . $ls), "lightness_" . $ls);
1673 $l_input->setMaxValue(100);
1674 $l_input->setMinValue(-100);
1675 $l_input->setValue((string) $v);
1676 $l_input->setSize(4);
1677 $l_input->setMaxLength(4);
1678 $this->form_gui->addItem($l_input);
1679 }
1680
1681 $this->form_gui->addCommandButton("templateGeneration", $lng->txt("generate"));
1682 $this->form_gui->addCommandButton("cancelTemplateSaving", $lng->txt("cancel"));
1683 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
1684 }
This class represents a number property in a property form.
This class represents a numeric style property in a property form.

References Vendor\Package\$c, $lng, and ILIAS\UI\Implementation\Component\Input\Field\$options.

◆ listColorsObject()

ilObjStyleSheetGUI::listColorsObject ( )

List colors of style.

Definition at line 787 of file class.ilObjStyleSheetGUI.php.

787 : void
788 {
789 $tpl = $this->gui_service->ui()->mainTemplate();
790 $ilToolbar = $this->gui_service->toolbar();
791 $ilCtrl = $this->ctrl;
792
793 if ($this->access_manager->checkWrite()) {
794 $ilToolbar->addButton(
795 $this->lng->txt("sty_add_color"),
796 $ilCtrl->getLinkTarget($this, "addColor")
797 );
798 }
799
800 $table = $this->getColorTable();
801 if ($table->handleCommand()) {
802 return;
803 }
804 $tpl->setContent($table->render());
805 }

References ILIAS\News\Common\Table\$tpl, ILIAS\Repository\lng(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ listMediaQueriesObject()

ilObjStyleSheetGUI::listMediaQueriesObject ( )

Definition at line 1022 of file class.ilObjStyleSheetGUI.php.

1022 : void
1023 {
1024 $tpl = $this->gui_service->ui()->mainTemplate();
1025 $ilToolbar = $this->gui_service->toolbar();
1026 $ilCtrl = $this->ctrl;
1027
1028 if ($this->access_manager->checkWrite()) {
1029 $ilToolbar->addButton(
1030 $this->lng->txt("sty_add_media_query"),
1031 $ilCtrl->getLinkTarget($this, "addMediaQuery")
1032 );
1033 }
1034
1035 $table = $this->getMediaQueryTable();
1036 if ($table->handleCommand()) {
1037 return;
1038 }
1039 $tpl->setContent($table->render());
1040 }

References ILIAS\News\Common\Table\$tpl, ILIAS\Repository\lng(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ listTemplatesObject()

ilObjStyleSheetGUI::listTemplatesObject ( )

List templates.

Definition at line 1216 of file class.ilObjStyleSheetGUI.php.

1216 : void
1217 {
1218 $tpl = $this->gui_service->ui()->mainTemplate();
1219 $ilTabs = $this->gui_service->tabs();
1220 $ilCtrl = $this->ctrl;
1221 $ilToolbar = $this->gui_service->toolbar();
1222
1223 $ctype = $this->style_request->getTempType();
1224 if ($ctype == "") {
1225 $ctype = "table";
1226 }
1227
1228 $this->setTemplatesSubTabs();
1229 $ilCtrl->setParameter($this, "temp_type", $ctype);
1230 $ilTabs->setSubTabActive("sty_" . $ctype . "_templates");
1232
1233 // action commands
1234 if ($this->access_manager->checkWrite()) {
1235 if ($ctype == "table") {
1236 $ilToolbar->addButton(
1237 $this->lng->txt("sty_generate_template"),
1238 $ilCtrl->getLinkTarget($this, "generateTemplate")
1239 );
1240 }
1241 $ilToolbar->addButton(
1242 $this->lng->txt("sty_add_template"),
1243 $ilCtrl->getLinkTarget($this, "addTemplate")
1244 );
1245 }
1246
1247
1248
1249 $this->includeCSS();
1250 $table = $this->getTemplateTable($ctype);
1251 if ($table->handleCommand()) {
1252 return;
1253 }
1254 $tpl->setContent($table->render());
1255 }
static addCss()
Add required css.
getTemplateTable(string $temp_type)

References ILIAS\News\Common\Table\$tpl, ilAccordionGUI\addCss(), ILIAS\Repository\lng(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ propertiesObject()

ilObjStyleSheetGUI::propertiesObject ( )

Definition at line 319 of file class.ilObjStyleSheetGUI.php.

319 : void
320 {
321 $tpl = $this->gui_service->ui()->mainTemplate();
323
324 $this->initPropertiesForm();
325 $this->getPropertiesValues();
326 $tpl->setContent($this->form->getHTML());
327 }
getPropertiesValues()
Get current values for properties from.
initPropertiesForm(string $a_mode="edit")
FORM: Init properties form.

References ilObjectGUI\$tpl, ILIAS\UICore\GlobalTemplate\addCss(), ILIAS\Repository\form(), ilObjStyleSheet\getContentStylePath(), getPropertiesValues(), initPropertiesForm(), ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ refreshTemplateObject()

ilObjStyleSheetGUI::refreshTemplateObject ( )

Refresh table template.

Definition at line 1486 of file class.ilObjStyleSheetGUI.php.

1486 : void
1487 {
1488 $this->updateTemplateObject(true);
1489 }
updateTemplateObject(bool $a_refresh=false)

◆ returnToUpperContextObject()

ilObjStyleSheetGUI::returnToUpperContextObject ( )

Definition at line 1919 of file class.ilObjStyleSheetGUI.php.

1919 : void
1920 {
1921 $ilCtrl = $this->ctrl;
1922 $ilCtrl->returnToParent($this);
1923 }

◆ saveColorObject()

ilObjStyleSheetGUI::saveColorObject ( )

Save color.

Definition at line 897 of file class.ilObjStyleSheetGUI.php.

897 : void
898 {
899 $tpl = $this->gui_service->ui()->mainTemplate();
900 $ilCtrl = $this->ctrl;
902
903 $this->initColorForm();
904 if ($this->form_gui->checkInput()) {
905 if ($this->color_manager->colorExists($this->form_gui->getInput("color_name"))) {
906 $col_input = $this->form_gui->getItemByPostVar("color_name");
907 $col_input->setAlert($lng->txt("sty_color_already_exists"));
908 } else {
909 $this->color_manager->addColor(
910 $this->form_gui->getInput("color_name"),
911 $this->form_gui->getInput("color_code")
912 );
913 $ilCtrl->redirect($this, "listColors");
914 }
915 }
916 $this->form_gui->setValuesByPost();
917 $tpl->setContent($this->form_gui->getHTML());
918 }

References $lng, ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ saveMediaQueryObject()

ilObjStyleSheetGUI::saveMediaQueryObject ( )

Save media query.

Definition at line 1120 of file class.ilObjStyleSheetGUI.php.

1120 : void
1121 {
1122 $tpl = $this->gui_service->ui()->mainTemplate();
1123 $ilCtrl = $this->ctrl;
1124 $lng = $this->lng;
1125
1126 $this->initMediaQueryForm();
1127
1128 if ($this->form_gui->checkInput()) {
1129 $this->object->addMediaQuery($this->form_gui->getInput("mquery"));
1130 $ilCtrl->redirect($this, "listMediaQueries");
1131 }
1132 $this->form_gui->setValuesByPost();
1133 $tpl->setContent($this->form_gui->getHTML());
1134 }

References $lng, ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ saveMediaQueryOrderObject()

ilObjStyleSheetGUI::saveMediaQueryOrderObject ( )

Definition at line 1198 of file class.ilObjStyleSheetGUI.php.

1198 : void
1199 {
1200 $ilCtrl = $this->ctrl;
1201
1202 $order = $this->style_request->getOrder();
1203 if (count($order) > 0) {
1204 $this->getStyleSheet()->saveMediaQueryOrder($order);
1205 }
1206 $ilCtrl->redirect($this, "listMediaQueries");
1207 }

◆ saveObject()

ilObjStyleSheetGUI::saveObject ( )

Reimplemented from ilObjectGUI.

Definition at line 455 of file class.ilObjStyleSheetGUI.php.

455 : void
456 {
457 $ctrl = $this->gui_service->ctrl();
458
459 $form = $this->getCreateForm();
460 $form->checkInput();
461
462 if (!trim($form->getInput("style_title"))) {
463 $ctrl->redirect($this, "create");
464 }
465
466 // copy from default style or ... see #11330
467 $default_style = $this->settings->get("default_content_style_id");
468 if (ilObject::_lookupType((int) $default_style) == "sty") {
469 $style_obj = ilObjectFactory::getInstanceByObjId((int) $default_style);
470 $new_id = $style_obj->ilClone();
471 $newObj = new ilObjStyleSheet($new_id);
472 } else {
473 // ... import from basic zip file
474 // called from creation in the administration
475 // or creation in a repository object
476 $imp = new ilImport();
477 $style_id = $imp->importObject(
478 null,
480 "style.zip",
481 "sty",
482 "components/ILIAS/Style",
483 true
484 );
485
486 $newObj = new ilObjStyleSheet($style_id);
487 }
488
489 $newObj->setTitle($form->getInput("style_title"));
490 $newObj->setDescription($form->getInput("style_description"));
491 $newObj->update();
492 $this->object = $newObj;
493
495
496 // assign style to style sheet folder,
497 // if parent is style sheet folder
498 if ($this->requested_ref_id > 0 &&
499 ilObject::_lookupType($this->requested_ref_id, true) === "stys") {
500 $cont_style_settings = new ilContentStyleSettings();
501 $cont_style_settings->addStyle($newObj->getId());
502 $cont_style_settings->update();
503
504 ilObjStyleSheet::_writeStandard($newObj->getId(), true);
505 $this->tpl->setOnScreenMessage("success", $this->lng->txt("object_added"), true);
506 $this->ctrl->setParameterByClass(self::class, "obj_id", (string) $newObj->getId());
507 $this->ctrl->redirectByClass(self::class, "");
508 }
509 }
static _addMissingStyleClassesToStyle(int $a_id)
Add missing style classes to all styles.
static _lookupType(int $id, bool $reference=false)

References ilObjStyleSheet\_addMissingStyleClassesToStyle(), ilObject\_lookupType(), ilObjStyleSheet\_writeStandard(), ilPropertyFormGUI\checkInput(), ILIAS\Repository\ctrl(), ilObjStyleSheet\getBasicZipPath(), ilPropertyFormGUI\getInput(), ilObjectFactory\getInstanceByObjId(), ILIAS\Repository\lng(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ saveTemplateObject()

ilObjStyleSheetGUI::saveTemplateObject ( )

Save table template.

Definition at line 1389 of file class.ilObjStyleSheetGUI.php.

1389 : void
1390 {
1391 $tpl = $this->gui_service->ui()->mainTemplate();
1392 $ilCtrl = $this->ctrl;
1393 $lng = $this->lng;
1394
1395 $this->initTemplateForm();
1396 $temp_type = $this->style_request->getTempType();
1397
1398 if ($this->form_gui->checkInput()) {
1399 if ($this->object->templateExists($this->form_gui->getInput("name"))) {
1400 $name_input = $this->form_gui->getItemByPostVar("name");
1401 $name_input->setAlert($lng->txt("sty_table_template_already_exists"));
1402 } else {
1403 $classes = array();
1404 foreach (ilObjStyleSheet::_getTemplateClassTypes($temp_type) as $tct => $ct) {
1405 $classes[$tct] = $this->form_gui->getInput($tct . "_class");
1406 }
1407 $t_id = $this->object->addTemplate(
1408 $temp_type,
1409 $this->form_gui->getInput("name"),
1410 $classes
1411 );
1412 $this->object->writeTemplatePreview(
1413 $t_id,
1414 $this->getTemplatePreview($temp_type, $t_id, true)
1415 );
1416 $ilCtrl->redirect($this, "listTemplates");
1417 }
1418 }
1419 $this->form_gui->setValuesByPost();
1420 $tpl->setContent($this->form_gui->getHTML());
1421 }

References $lng, ILIAS\News\Common\Table\$tpl, ilObjStyleSheet\_getTemplateClassTypes(), ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ setTemplatesSubTabs()

ilObjStyleSheetGUI::setTemplatesSubTabs ( )

Definition at line 692 of file class.ilObjStyleSheetGUI.php.

692 : void
693 {
694 $ilTabs = $this->gui_service->tabs();
695 $ilCtrl = $this->ctrl;
696
698
699 foreach ($types as $t => $c) {
700 $ilCtrl->setParameter($this, "temp_type", $t);
701 $ilTabs->addSubTabTarget(
702 "sty_" . $t . "_templates",
703 $this->ctrl->getLinkTarget($this, "listTemplates"),
704 array("listTemplates", ""),
705 get_class($this)
706 );
707 }
708
709 $ilCtrl->setParameter($this, "temp_type", $this->style_request->getTempType());
710 }

References Vendor\Package\$c, ilObjStyleSheet\_getTemplateClassTypes(), and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ templateGenerationObject()

ilObjStyleSheetGUI::templateGenerationObject ( )

Table template generation.

Definition at line 1689 of file class.ilObjStyleSheetGUI.php.

1689 : void
1690 {
1691 $tpl = $this->gui_service->ui()->mainTemplate();
1692 $ilCtrl = $this->ctrl;
1693 $lng = $this->lng;
1694
1696
1697 if ($this->form_gui->checkInput()) {
1698 if ($this->object->templateExists($this->form_gui->getInput("name"))) {
1699 $name_input = $this->form_gui->getItemByPostVar("name");
1700 $name_input->setAlert($lng->txt("sty_table_template_already_exists"));
1701 } else {
1702 // -> move to application class!
1703
1704 // cell classes
1705 $cells = array("H" => "header", "C1" => "cell1", "C2" => "cell2");
1706 $tb_p = $this->form_gui->getItemByPostVar("tb_padding");
1707 $tb_padding = $tb_p->getValue();
1708 $lr_p = $this->form_gui->getItemByPostVar("lr_padding");
1709 $lr_padding = $lr_p->getValue();
1710 $cell_color = $this->form_gui->getInput("base_color");
1711
1712 // use mid gray as cell color for bw zebra
1713 if ($this->form_gui->getInput("layout") == "bwZebra") {
1714 $cell_color = "MidGray";
1715 if (!$this->color_manager->colorExists($cell_color)) {
1716 $this->color_manager->addColor($cell_color, "7F7F7F");
1717 }
1718 $this->color_manager->updateColor($cell_color, $cell_color, "7F7F7F");
1719 }
1720
1721 foreach ($cells as $k => $cell) {
1722 $cell_class[$k] = $this->form_gui->getInput("name") . $k;
1723 if (!$this->object->characteristicExists($cell_class[$k], "table_cell")) {
1724 $this->characteristic_manager->addCharacteristic("table_cell", $cell_class[$k], true);
1725 }
1726 if ($this->form_gui->getInput("layout") == "bwZebra" && $k == "H") {
1727 $this->characteristic_manager->replaceParameter(
1728 "td",
1729 $cell_class[$k],
1730 "color",
1731 "!" . $this->form_gui->getInput("base_color") . "(" . $this->form_gui->getInput("lightness_" . $cell . "_text") . ")",
1732 "table_cell"
1733 );
1734 $this->characteristic_manager->replaceParameter(
1735 "td",
1736 $cell_class[$k],
1737 "background-color",
1738 "!" . $this->form_gui->getInput("base_color") . "(" . $this->form_gui->getInput("lightness_" . $cell . "_bg") . ")",
1739 "table_cell"
1740 );
1741 } else {
1742 $this->characteristic_manager->replaceParameter(
1743 "td",
1744 $cell_class[$k],
1745 "color",
1746 "!" . $cell_color . "(" . $this->form_gui->getInput("lightness_" . $cell . "_text") . ")",
1747 "table_cell"
1748 );
1749 $this->characteristic_manager->replaceParameter(
1750 "td",
1751 $cell_class[$k],
1752 "background-color",
1753 "!" . $cell_color . "(" . $this->form_gui->getInput("lightness_" . $cell . "_bg") . ")",
1754 "table_cell"
1755 );
1756 }
1757 $this->characteristic_manager->replaceParameter(
1758 "td",
1759 $cell_class[$k],
1760 "padding-top",
1761 $tb_padding,
1762 "table_cell"
1763 );
1764 $this->characteristic_manager->replaceParameter(
1765 "td",
1766 $cell_class[$k],
1767 "padding-bottom",
1768 $tb_padding,
1769 "table_cell"
1770 );
1771 $this->characteristic_manager->replaceParameter(
1772 "td",
1773 $cell_class[$k],
1774 "padding-left",
1775 $lr_padding,
1776 "table_cell"
1777 );
1778 $this->characteristic_manager->replaceParameter(
1779 "td",
1780 $cell_class[$k],
1781 "padding-right",
1782 $lr_padding,
1783 "table_cell"
1784 );
1785 $this->characteristic_manager->replaceParameter(
1786 "td",
1787 $cell_class[$k],
1788 "border-width",
1789 "1px",
1790 "table_cell"
1791 );
1792 $this->characteristic_manager->replaceParameter(
1793 "td",
1794 $cell_class[$k],
1795 "border-style",
1796 "solid",
1797 "table_cell"
1798 );
1799 $this->characteristic_manager->replaceParameter(
1800 "td",
1801 $cell_class[$k],
1802 "border-color",
1803 "!" . $cell_color . "(" . $this->form_gui->getInput("lightness_border") . ")",
1804 "table_cell"
1805 );
1806 $this->characteristic_manager->replaceParameter(
1807 "td",
1808 $cell_class[$k],
1809 "font-weight",
1810 "normal",
1811 "table_cell"
1812 );
1813 }
1814
1815 // table class
1816 $classes["table"] = $this->form_gui->getInput("name") . "T";
1817 if (!$this->object->characteristicExists($classes["table"], "table")) {
1818 $this->characteristic_manager->addCharacteristic("table", $classes["table"], true);
1819 }
1820 $this->characteristic_manager->replaceParameter(
1821 "table",
1822 $classes["table"],
1823 "caption-side",
1824 "bottom",
1825 "table"
1826 );
1827 $this->characteristic_manager->replaceParameter(
1828 "table",
1829 $classes["table"],
1830 "border-collapse",
1831 "collapse",
1832 "table"
1833 );
1834 $this->characteristic_manager->replaceParameter(
1835 "table",
1836 $classes["table"],
1837 "margin-top",
1838 "5px",
1839 "table"
1840 );
1841 $this->characteristic_manager->replaceParameter(
1842 "table",
1843 $classes["table"],
1844 "margin-bottom",
1845 "5px",
1846 "table"
1847 );
1848 if ($this->form_gui->getInput("layout") == "bwZebra") {
1849 $this->characteristic_manager->replaceParameter(
1850 "table",
1851 $classes["table"],
1852 "border-bottom-color",
1853 "!" . $this->form_gui->getInput("base_color"),
1854 "table"
1855 );
1856 $this->characteristic_manager->replaceParameter(
1857 "table",
1858 $classes["table"],
1859 "border-bottom-style",
1860 "solid",
1861 "table"
1862 );
1863 $this->characteristic_manager->replaceParameter(
1864 "table",
1865 $classes["table"],
1866 "border-bottom-width",
1867 "3px",
1868 "table"
1869 );
1870 $sb = array("left", "right", "top");
1871 foreach ($sb as $b) {
1872 $this->characteristic_manager->replaceParameter(
1873 "table",
1874 $classes["table"],
1875 "border-" . $b . "-width",
1876 "0px",
1877 "table"
1878 );
1879 }
1880 }
1881
1882 switch ($this->form_gui->getInput("layout")) {
1883 case "bwZebra":
1884 case "coloredZebra":
1885 $classes["row_head"] = $cell_class["H"];
1886 $classes["odd_row"] = $cell_class["C1"];
1887 $classes["even_row"] = $cell_class["C2"];
1888 break;
1889
1890 case "noZebra":
1891 $classes["row_head"] = $cell_class["H"];
1892 $classes["odd_row"] = $cell_class["C1"];
1893 $classes["even_row"] = $cell_class["C1"];
1894 $classes["col_head"] = $cell_class["C2"];
1895 break;
1896 }
1897
1898
1899 $t_id = $this->object->addTemplate(
1900 $this->style_request->getTempType(),
1901 $this->form_gui->getInput("name"),
1902 $classes
1903 );
1904 $this->object->writeTemplatePreview(
1905 $t_id,
1906 $this->getTemplatePreview(
1907 $this->style_request->getTempType(),
1908 $t_id,
1909 true
1910 )
1911 );
1912 $ilCtrl->redirect($this, "listTemplates");
1913 }
1914 }
1915 $this->form_gui->setValuesByPost();
1916 $tpl->setContent($this->form_gui->getHTML());
1917 }

References Vendor\Package\$b, $lng, ILIAS\News\Common\Table\$tpl, ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ updateColorObject()

ilObjStyleSheetGUI::updateColorObject ( )

Update color.

Definition at line 923 of file class.ilObjStyleSheetGUI.php.

923 : void
924 {
925 $tpl = $this->gui_service->ui()->mainTemplate();
926 $ilCtrl = $this->ctrl;
928
929 $c_name = $this->style_request->getColorName();
930 $ilCtrl->setParameter($this, "c_name", $c_name);
931 $this->initColorForm("edit");
932
933 if ($this->form_gui->checkInput()) {
934 if ($this->color_manager->colorExists($this->form_gui->getInput("color_name")) &&
935 $this->form_gui->getInput("color_name") != $c_name) {
936 $col_input = $this->form_gui->getItemByPostVar("color_name");
937 $col_input->setAlert($lng->txt("sty_color_already_exists"));
938 } else {
939 $this->color_manager->updateColor(
940 $c_name,
941 $this->form_gui->getInput("color_name"),
942 $this->form_gui->getInput("color_code")
943 );
944 $ilCtrl->redirect($this, "listColors");
945 }
946 }
947 $this->form_gui->setValuesByPost();
948 $tpl->setContent($this->form_gui->getHTML());
949 }

References $lng, ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ updateMediaQueryObject()

ilObjStyleSheetGUI::updateMediaQueryObject ( )

Definition at line 1136 of file class.ilObjStyleSheetGUI.php.

1136 : void
1137 {
1138 $tpl = $this->gui_service->ui()->mainTemplate();
1139 $ilCtrl = $this->ctrl;
1140
1141 $this->initMediaQueryForm("edit");
1142
1143 if ($this->form_gui->checkInput()) {
1144 $this->object->updateMediaQuery(
1145 $this->style_request->getMediaQueryId(),
1146 $this->form_gui->getInput("mquery")
1147 );
1148 $ilCtrl->redirect($this, "listMediaQueries");
1149 }
1150 $ilCtrl->setParameter($this, "mq_id", $this->style_request->getMediaQueryId());
1151 $this->form_gui->setValuesByPost();
1152 $tpl->setContent($this->form_gui->getHTML());
1153 }

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ updateObject()

ilObjStyleSheetGUI::updateObject ( )

updates object entry in object_data

Reimplemented from ilObjectGUI.

Definition at line 387 of file class.ilObjStyleSheetGUI.php.

387 : void
388 {
390 $ctrl = $this->gui_service->ctrl();
391 $tpl = $this->gui_service->ui()->mainTemplate();
392
393 $this->initPropertiesForm("edit");
394 if ($this->form->checkInput()) {
395 $this->object->setTitle($this->form->getInput("style_title"));
396 $this->object->setDescription($this->form->getInput("style_description"));
397 $this->object->writeStyleSetting(
398 "disable_auto_margins",
399 $this->form->getInput("disable_auto_margins")
400 );
401 $this->object->update();
402 $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
403 $ctrl->redirect($this, "properties");
404 } else {
405 $this->form->setValuesByPost();
406 $tpl->setContent($this->form->getHTML());
407 }
408 }

References $lng, ILIAS\News\Common\Table\$tpl, ILIAS\Repository\form(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ updateTemplateObject()

ilObjStyleSheetGUI::updateTemplateObject ( bool  $a_refresh = false)

Definition at line 1423 of file class.ilObjStyleSheetGUI.php.

1425 : void {
1426 $ilCtrl = $this->ctrl;
1427 $lng = $this->lng;
1428
1429 $ilCtrl->setParameter($this, "t_id", $this->style_request->getTemplateId());
1430 $this->initTemplateForm("edit");
1431 $temp_type = $this->style_request->getTempType();
1432
1433 $t_id = $this->style_request->getTemplateId();
1434 if ($this->form_gui->checkInput()) {
1435 if ($this->object->templateExists($this->form_gui->getInput("name")) &&
1436 $this->form_gui->getInput("name") != ilObjStyleSheet::_lookupTemplateName($t_id)) {
1437 $name_input = $this->form_gui->getItemByPostVar("name");
1438 $name_input->setAlert($lng->txt("sty_template_already_exists"));
1439 } else {
1440 $classes = array();
1441 foreach (ilObjStyleSheet::_getTemplateClassTypes($temp_type) as $tct => $ct) {
1442 $classes[$tct] = $this->form_gui->getInput($tct . "_class");
1443 }
1444
1445 $this->object->updateTemplate(
1446 $t_id,
1447 $this->form_gui->getInput("name"),
1448 $classes
1449 );
1450 $this->object->writeTemplatePreview(
1451 $t_id,
1452 $this->getTemplatePreview($temp_type, $t_id, true)
1453 );
1454 if (!$a_refresh) {
1455 $ilCtrl->redirect($this, "listTemplates");
1456 }
1457 }
1458 }
1459
1460 $this->form_gui->setValuesByPost();
1461 $this->displayTemplateEditForm();
1462 }
static _lookupTemplateName(int $a_t_id)
Lookup table template name for template ID.

◆ viewObject()

ilObjStyleSheetGUI::viewObject ( )

viewObject container presentation for "administration -> repository, trash, permissions"

Reimplemented from ilObjectGUI.

Definition at line 174 of file class.ilObjStyleSheetGUI.php.

174 : void
175 {
176 $this->editObject();
177 }
editObject()
Edit -> List characteristics.

References editObject().

+ Here is the call graph for this function:

Field Documentation

◆ $access_manager

Access StyleAccessManager ilObjStyleSheetGUI::$access_manager
protected

Definition at line 44 of file class.ilObjStyleSheetGUI.php.

◆ $characteristic_manager

Content CharacteristicManager ilObjStyleSheetGUI::$characteristic_manager
protected

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

◆ $cmd_delete

string ilObjStyleSheetGUI::$cmd_delete

Definition at line 41 of file class.ilObjStyleSheetGUI.php.

◆ $cmd_new_par

string ilObjStyleSheetGUI::$cmd_new_par

Definition at line 40 of file class.ilObjStyleSheetGUI.php.

◆ $cmd_update

string ilObjStyleSheetGUI::$cmd_update

Definition at line 39 of file class.ilObjStyleSheetGUI.php.

◆ $color_manager

Content ColorManager ilObjStyleSheetGUI::$color_manager
protected

Definition at line 46 of file class.ilObjStyleSheetGUI.php.

◆ $domain

Content InternalDomainService ilObjStyleSheetGUI::$domain
protected

Definition at line 32 of file class.ilObjStyleSheetGUI.php.

◆ $enable_write

bool ilObjStyleSheetGUI::$enable_write = false
protected

Definition at line 42 of file class.ilObjStyleSheetGUI.php.

◆ $form

ilPropertyFormGUI ilObjStyleSheetGUI::$form
protected

◆ $form_gui

ilPropertyFormGUI ilObjStyleSheetGUI::$form_gui
protected

Definition at line 33 of file class.ilObjStyleSheetGUI.php.

◆ $gui_service

Content InternalGUIService ilObjStyleSheetGUI::$gui_service
protected

Definition at line 48 of file class.ilObjStyleSheetGUI.php.

◆ $help

ilHelpGUI ilObjStyleSheetGUI::$help
protected

Definition at line 37 of file class.ilObjStyleSheetGUI.php.

Referenced by createObject().

◆ $image_manager

Content ImageManager ilObjStyleSheetGUI::$image_manager
protected

Definition at line 47 of file class.ilObjStyleSheetGUI.php.

◆ $obj_definition

ilObjectDefinition ilObjStyleSheetGUI::$obj_definition
protected

Definition at line 38 of file class.ilObjStyleSheetGUI.php.

◆ $service

Content InternalService ilObjStyleSheetGUI::$service
protected

Definition at line 36 of file class.ilObjStyleSheetGUI.php.

◆ $style_request

Content StandardGUIRequest ilObjStyleSheetGUI::$style_request
protected

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

◆ $super_type

string ilObjStyleSheetGUI::$super_type
protected

Definition at line 43 of file class.ilObjStyleSheetGUI.php.


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