# License

Represents the license of a plugin. Used to display the license in the Panel system view

****

- Since [5.0.0](https://github.com/getkirby/kirby/releases/tag/5.0.0)
- Full class name: `Kirby\Plugin\License`
- Source: <https://github.com/getkirby/kirby/tree/5.5.3/src/Plugin/License.php#L19>

****

### License

- [new License()](https://getkirby.com/docs/reference/objects/plugin/license/__construct.md)
- [$license->__toString()](https://getkirby.com/docs/reference/objects/plugin/license/__to-string.md)
- [License::from()](https://getkirby.com/docs/reference/objects/plugin/license/from.md)
- [$license->link()](https://getkirby.com/docs/reference/objects/plugin/license/link.md)
- [$license->name()](https://getkirby.com/docs/reference/objects/plugin/license/name.md)
- [$license->status()](https://getkirby.com/docs/reference/objects/plugin/license/status.md)
- [$license->toArray()](https://getkirby.com/docs/reference/objects/plugin/license/to-array.md)

## Examples

```php
use Kirby\Plugin\License;
use Kirby\Plugin\LicenseStatus;
use Kirby\Plugin\Plugin;

class MyCustomLicense extends License
{
  public function __construct(
    protected Plugin $plugin
  ){
    $this->name = 'My Custom License';
    $this->link = '<https://mylicenseshop.com>';
    $this->status = new LicenseStatus(
      value: 'missing',
      theme: 'negative',
      label: 'Get a license please',
      icon: 'alert',
      dialog: 'my/dialog/endpoint'
    )
  }
}

Kirby::plugin(
  name: 'my/plugin',
  extends: [...],
  license: fn (Plugin $plugin) => new MyCustomLicense($plugin)
);
```