ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilWebLinkItem Class Reference

Immutable class for Web Link items. More...

+ Inheritance diagram for ilWebLinkItem:
+ Collaboration diagram for ilWebLinkItem:

Public Member Functions

 __construct (int $webr_id, int $link_id, string $title, ?string $description, string $target, bool $active, DateTimeImmutable $create_date, DateTimeImmutable $last_update, array $parameters)
 
 getResolvedLink (bool $with_parameters=true)
 
 isInternal ()
 
 toXML (ilXmlWriter $writer, int $position)
 
 getWebrId ()
 
 getLinkId ()
 
 getCreateDate ()
 
 getLastUpdate ()
 
 getParameters ()
 
- Public Member Functions inherited from ilWebLinkBaseItem
 __construct (string $title, ?string $description, string $target, bool $active, array $parameters)
 
 isInternal ()
 
 getTitle ()
 
 getDescription ()
 
 getTarget ()
 
 isActive ()
 
 getParameters ()
 

Protected Attributes

int $webr_id
 
int $link_id
 
DateTimeImmutable $create_date
 
DateTimeImmutable $last_update
 
array $parameters
 
- Protected Attributes inherited from ilWebLinkBaseItem
string $title
 
string $target
 
bool $active
 
array $parameters
 
string $description
 

Detailed Description

Immutable class for Web Link items.

Author
Tim Schmitz schmi.nosp@m.tz@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.ilWebLinkItem.php.

Constructor & Destructor Documentation

◆ __construct()

ilWebLinkItem::__construct ( int  $webr_id,
int  $link_id,
string  $title,
?string  $description,
string  $target,
bool  $active,
DateTimeImmutable  $create_date,
DateTimeImmutable  $last_update,
array  $parameters 
)
Parameters
int$webr_id
int$link_id
string$title
string | null$description
string$target
bool$active
DateTimeImmutable$create_date
DateTimeImmutable$last_update
ilWebLinkParameter[]$parameters

Definition at line 49 of file class.ilWebLinkItem.php.

59 {
61 $this->webr_id = $webr_id;
62 $this->link_id = $link_id;
63 $this->create_date = $create_date;
64 $this->last_update = $last_update;
65 }
DateTimeImmutable $create_date
DateTimeImmutable $last_update
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ilWebLinkBaseItem\$active, $create_date, ilWebLinkBaseItem\$description, $last_update, $link_id, $parameters, ilWebLinkBaseItem\$target, ilWebLinkBaseItem\$title, $webr_id, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ getCreateDate()

ilWebLinkItem::getCreateDate ( )

Definition at line 103 of file class.ilWebLinkItem.php.

103 : DateTimeImmutable
104 {
105 return $this->create_date;
106 }

References $create_date.

◆ getLastUpdate()

ilWebLinkItem::getLastUpdate ( )

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

108 : DateTimeImmutable
109 {
110 return $this->last_update;
111 }

References $last_update.

◆ getLinkId()

ilWebLinkItem::getLinkId ( )

Definition at line 98 of file class.ilWebLinkItem.php.

98 : int
99 {
100 return $this->link_id;
101 }

References $link_id.

Referenced by toXML().

+ Here is the caller graph for this function:

◆ getParameters()

ilWebLinkItem::getParameters ( )
Returns
ilWebLinkParameter[]

Reimplemented from ilWebLinkBaseItem.

Definition at line 116 of file class.ilWebLinkItem.php.

116 : array
117 {
118 return $this->parameters;
119 }

References $parameters.

Referenced by ilWebLinkItemExternal\getResolvedLink(), ilWebLinkItemInternal\getResolvedLink(), and toXML().

+ Here is the caller graph for this function:

◆ getResolvedLink()

ilWebLinkItem::getResolvedLink ( bool  $with_parameters = true)
abstract

◆ getWebrId()

ilWebLinkItem::getWebrId ( )

Definition at line 93 of file class.ilWebLinkItem.php.

93 : int
94 {
95 return $this->webr_id;
96 }

References $webr_id.

◆ isInternal()

ilWebLinkItem::isInternal ( )
abstract

Reimplemented from ilWebLinkBaseItem.

Reimplemented in ilWebLinkItemExternal, and ilWebLinkItemInternal.

Referenced by toXML().

+ Here is the caller graph for this function:

◆ toXML()

ilWebLinkItem::toXML ( ilXmlWriter  $writer,
int  $position 
)

Definition at line 71 of file class.ilWebLinkItem.php.

71 : void
72 {
73 $writer->xmlStartTag(
74 'WebLink',
75 [
76 'id' => $this->getLinkId(),
77 'active' => (int) $this->isActive(),
78 'position' => $position,
79 'internal' => (int) $this->isInternal(),
80 ]
81 );
82 $writer->xmlElement('Title', [], $this->getTitle());
83 $writer->xmlElement('Description', [], $this->getDescription());
84 $writer->xmlElement('Target', [], $this->getTarget());
85
86 foreach ($this->getParameters() as $parameter) {
87 $parameter->toXML($writer);
88 }
89
90 $writer->xmlEndTag('WebLink');
91 }
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.

References ilWebLinkBaseItem\getDescription(), getLinkId(), getParameters(), ilWebLinkBaseItem\getTarget(), ilWebLinkBaseItem\getTitle(), ilWebLinkBaseItem\isActive(), isInternal(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

+ Here is the call graph for this function:

Field Documentation

◆ $create_date

DateTimeImmutable ilWebLinkItem::$create_date
protected

Definition at line 30 of file class.ilWebLinkItem.php.

Referenced by __construct(), and getCreateDate().

◆ $last_update

DateTimeImmutable ilWebLinkItem::$last_update
protected

Definition at line 31 of file class.ilWebLinkItem.php.

Referenced by __construct(), and getLastUpdate().

◆ $link_id

int ilWebLinkItem::$link_id
protected

Definition at line 28 of file class.ilWebLinkItem.php.

Referenced by __construct(), and getLinkId().

◆ $parameters

array ilWebLinkItem::$parameters
protected

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

Referenced by __construct(), and getParameters().

◆ $webr_id

int ilWebLinkItem::$webr_id
protected

Definition at line 27 of file class.ilWebLinkItem.php.

Referenced by __construct(), and getWebrId().


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