Interface luya\web\LinkInterface
| Implemented by | luya\admin\file\Item, luya\cms\menu\Item, luya\web\BaseLink, luya\web\EmailLink, luya\web\TelephoneLink, luya\web\WebsiteLink |
|---|---|
| Available since version | 1.0.0 |
| Source Code | https://github.com/luyadev/luya/blob/master/core/web/LinkInterface.php |
Link Resource Interface.
Each Linkable resource object must integrate this interface in order to define the structure of a Linkable resource.
<a href="<?= $object->getHref(); ?>" target="<?= $object->getTarget(); ?>">Go To</a>
When implementing the LinkInterface its very common to also use the {{luya\web\LinkTrait}}.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getHref() | Get the href attribute value inside the Link tag. | luya\web\LinkInterface |
| getTarget() | Get the target attribute value inside the Link tag. | luya\web\LinkInterface |
Method Details
Get the href attribute value inside the Link tag.
| public abstract string getHref ( ) | ||
| return | string |
Returns the href string which can be either with or without domain. |
|---|---|---|
public function getHref();