Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Constructs the object
- *
- * @example:
- *
- * new Link ('users', 'edit', ['PARTY_ID' => 27], true) will result in
- * /ADMIN_PATH/users/edit?PARTY_ID=27
- * <a href="/ADMIN_PATH/users/edit?PARTY_ID=27" target="_blank"></a>
- *
- * @param string $module the module
- * to where the link is pointing to
- * @param string $action to controller/action
- * to where the link is pointing to
- * @param array $params the html params
- * to be added to the link the key is the
- * variable name and the value is the
- * value of the variable
- * @param boolean $blank true the link must be
- * open in a new tab, false it must not
- */
- public function __construct($module, $action, $params, $blank, $anchor = false) {
- $this->module = $module;
- $this->action = $action;
- $this->params = $params;
- $this->blank = $blank;
- $this->isTemplate = false;
- $this->anchor = '';
- if (!empty($anchor)) {
- $this->anchor = '#' . $anchor;
- }
- if ($this->blank) {
- $this->addAtribute('target', '_blank');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement