https://github.com/cornernote/yii2-link-behavior
LinkBehavior helper for automatic url and link model methods in Yii2
https://github.com/cornernote/yii2-link-behavior
Last synced: 4 months ago
JSON representation
LinkBehavior helper for automatic url and link model methods in Yii2
- Host: GitHub
- URL: https://github.com/cornernote/yii2-link-behavior
- Owner: cornernote
- License: other
- Created: 2017-04-07T01:11:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-30T03:59:18.000Z (over 6 years ago)
- Last Synced: 2025-01-24T05:23:50.356Z (6 months ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Yii2 Link Behavior
[](https://github.com/cornernote/yii2-link-behavior/tags)
[](LICENSE.md)
[](https://travis-ci.org/cornernote/yii2-link-behavior)
[](https://scrutinizer-ci.com/g/cornernote/yii2-link-behavior/code-structure)
[](https://scrutinizer-ci.com/g/cornernote/yii2-link-behavior)
[](https://packagist.org/packages/cornernote/yii2-link-behavior)Link behavior for Yii2.
## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
$ composer require cornernote/yii2-link-behavior "*"
```or add
```
"cornernote/yii2-link-behavior": "*"
```to the `require` section of your `composer.json` file.
## Usage
In your ActiveRecord class:
```php
public function behaviors() {
return [
\cornernote\linkbehavior\LinkBehavior::className(),
// or
[
'class' => \cornernote\linkbehavior\LinkBehavior::className(),
],
];
}
```