/** * Return the tag links. * * @param array $attributes * @return string */ public function tagLinks(array $attributes = []) { array_set($attributes, 'class', array_get($attributes, 'class', 'label label-default')); return array_map(function ($label) use($attributes) { return $this->html->link(implode('/', [$this->config->get('anomaly.module.posts::paths.module'), $this->config->get('anomaly.module.posts::paths.tag'), $label]), $label, $attributes); }, (array) $this->object->getTags()); }
/** * Return the tag links. * * @param array $attributes * @return string */ public function tagLinks(array $attributes = []) { array_set($attributes, 'class', array_get($attributes, 'class', 'label label-default')); return array_map(function ($label) use($attributes) { return $this->html->link(implode('/', [$this->settings->value('anomaly.module.posts::module_segment', 'posts'), $this->settings->value('anomaly.module.posts::tag_segment', 'tag'), $label]), $label, $attributes); }, (array) $this->object->getTags()); }
/** * Return a link. * * @param null $text * @return bool */ public function link($title = null, $attributes = []) { if (!($url = $this->object->getValue())) { return null; } if (!$title) { $title = $this->object->getValue(); } return $this->html->link($url, $title, $attributes); }
/** * Generates a link for sor url * * @param string $field * @param string|null $name * @param array $attributes * @param string|null $path * */ public function link($field, $name = null, array $attributes = [], $path = null) { if ($name === null) { $name = ucwords(strtr($field, ['_' => ' ', '-' => ' '])); } $attributes += ['data-laravel-sorter-direction' => $this->getConditionallyDirection($field)]; return $this->html->link($this->url($field, $path), $name, $attributes); }
/** * Generate a HTML link. * * @param string $url * @param string $title * @param array $attributes * @param bool $secure * @return \Illuminate\Support\HtmlString * @static */ public static function link($url, $title = null, $attributes = array(), $secure = null) { return \Collective\Html\HtmlBuilder::link($url, $title, $attributes, $secure); }