PHP code example of maslosoft / addendum
1. Go to this page and download the library: Download maslosoft/addendum library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maslosoft / addendum example snippets
class Page implements AnnotatedInterface
{
/**
* Page URL
* @Label('Page URL')
* @Description('Relative URL, it should be simple lowercase string with words separated by hyphen')
* @SearchBoost(3.5)
* @I18N
* @SafeValidator
* @UrlValidator
* @Decorator(Action, 'update')
* @see Action
* @var string
*/
public $url = '';
}
echo Meta::create(Page::class)->url->label;
// Will echo "Page URL"