ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Link.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2017 Alexander Killing <killing@leifos.de> Extended GPL, see docs/LICENSE */
4
6
9
13abstract class Link implements C\Link\Link
14{
16
20 protected $action;
21
26
27 public function __construct($action)
28 {
29 $this->checkStringArg("action", $action);
30 $this->action = $action;
31 }
32
36 public function getAction()
37 {
38 return $this->action;
39 }
40
45 {
46 $clone = clone $this;
47 $clone->open_in_new_viewport = (bool) $open_in_new_viewport;
48 return $clone;
49 }
50
54 public function getOpenInNewViewport()
55 {
57 }
58}
An exception for terminatinating execution or to throw for unit testing.
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
trait ComponentHelper
Provides common functionality for component implementations.