ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder Class Reference
+ Inheritance diagram for ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder:
+ Collaboration diagram for ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder:

Public Member Functions

 __construct (protected InternalDomainService $domain, protected InternalGUIService $gui, protected \ilObjMediaObject $media_object, object $parent_gui, string $parent_cmd)
 
- Public Member Functions inherited from ILIAS\Repository\Table\CommonTableBuilder
 __construct (protected object $parent_gui, protected string $parent_cmd, bool $numeric_ids=true)
 
 getTable ()
 

Protected Member Functions

 getId ()
 
 getTitle ()
 
 getRetrieval ()
 
 transformRow (array $data_row)
 transform raw data array to table row data array More...
 
 build (TableAdapterGUI $table)
 
- Protected Member Functions inherited from ILIAS\Repository\Table\CommonTableBuilder
 getId ()
 
 getTitle ()
 
 getRetrieval ()
 
 getNamespace ()
 
 getOrderingCommand ()
 
 activeAction (string $action, array $data_row)
 
 transformRow (array $data_row)
 transform raw data array to table row data array More...
 
 build (TableAdapterGUI $table)
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Repository\Table\CommonTableBuilder
TableAdapterGUI $table
 

Detailed Description

Definition at line 24 of file ImageMapTableBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder::__construct ( protected InternalDomainService  $domain,
protected InternalGUIService  $gui,
protected \ilObjMediaObject  $media_object,
object  $parent_gui,
string  $parent_cmd 
)

Definition at line 26 of file ImageMapTableBuilder.php.

32 {
33 parent::__construct($parent_gui, $parent_cmd);
34 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder::build ( TableAdapterGUI  $table)
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 75 of file ImageMapTableBuilder.php.

75 : TableAdapterGUI
76 {
77 $lng = $this->domain->lng();
78 $parent_class = get_class($this->parent_gui);
79
80 return $table
81 ->textColumn("title", $lng->txt("cont_name"), true)
82 ->textColumn("shape", $lng->txt("cont_shape"))
83 ->textColumn("coords", $lng->txt("cont_coords"))
84 ->textColumn("highlight_mode", $lng->txt("cont_highlight_mode"))
85 ->textColumn("highlight_class", $lng->txt("cont_highlight_class"))
86 ->textColumn("link", $lng->txt("cont_link"))
87 ->singleAction("editTitle", $lng->txt("title"), true)
88 ->singleAction("editHighlightMode", $lng->txt("cont_highlight_mode"), true)
89 ->singleAction("editHighlightClass", $lng->txt("cont_highlight_class"), true)
90 ->singleRedirectAction(
91 "deleteAreas",
92 $lng->txt("delete"),
93 [$parent_class],
94 "deleteAreas",
95 "area_nr"
96 )
97 ->singleRedirectAction(
98 "editLink",
99 $lng->txt("cont_set_link"),
100 [$parent_class],
101 "editLink",
102 "area_nr"
103 )
104 ->singleRedirectAction(
105 "editShapeWholePicture",
106 $lng->txt("cont_edit_shape_whole_picture"),
107 [$parent_class],
108 "editShapeWholePicture",
109 "area_nr"
110 )
111 ->singleRedirectAction(
112 "editShapeRectangle",
113 $lng->txt("cont_edit_shape_rectangle"),
114 [$parent_class],
115 "editShapeRectangle",
116 "area_nr"
117 )
118 ->singleRedirectAction(
119 "editShapeCircle",
120 $lng->txt("cont_edit_shape_circle"),
121 [$parent_class],
122 "editShapeCircle",
123 "area_nr"
124 )
125 ->singleRedirectAction(
126 "editShapePolygon",
127 $lng->txt("cont_edit_shape_polygon"),
128 [$parent_class],
129 "editShapePolygon",
130 "area_nr"
131 );
132 }
textColumn(string $key, string $title, bool $sortable=false)
global $lng
Definition: privfeed.php:26

References $lng, ILIAS\Repository\Table\CommonTableBuilder\$table, and ILIAS\Repository\Table\TableAdapterGUI\textColumn().

+ Here is the call graph for this function:

◆ getId()

ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder::getId ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 36 of file ImageMapTableBuilder.php.

36 : string
37 {
38 return "image_map";
39 }

◆ getRetrieval()

ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder::getRetrieval ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 46 of file ImageMapTableBuilder.php.

46 : RetrievalInterface
47 {
48 return $this->domain->imageMapRetrieval($this->media_object);
49 }

◆ getTitle()

ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder::getTitle ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 41 of file ImageMapTableBuilder.php.

41 : string
42 {
43 return $this->domain->lng()->txt("cont_imagemap");
44 }

◆ transformRow()

ILIAS\MediaObjects\ImageMap\ImageMapTableBuilder::transformRow ( array  $data_row)
protected

transform raw data array to table row data array

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 51 of file ImageMapTableBuilder.php.

51 : array
52 {
53 $link = "";
54 if ($data_row["link_type"] === "ext") {
55 $link = $data_row["href"];
56 } elseif ($data_row["link_type"] === "int") {
57 $link = $this->parent_gui->getMapAreaLinkString(
58 $data_row["target"],
59 $data_row["type"],
60 $data_row["target_frame"]
61 );
62 }
63
64 return [
65 "id" => $data_row["id"],
66 "title" => $data_row["title"],
67 "shape" => $data_row["shape"],
68 "coords" => $data_row["coords"],
69 "highlight_mode" => $data_row["highlight_mode"],
70 "highlight_class" => $data_row["highlight_class"],
71 "link" => $link
72 ];
73 }

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