Auth items have the default fields: name, type, description, bizrule, data. How would I add a field for a human readable label? I would like to access it it through:
$someAuthItem->getLabel();
Thanks!
Auth items have the default fields: name, type, description, bizrule, data. How would I add a field for a human readable label? I would like to access it it through:
$someAuthItem->getLabel();
Thanks!
You need to provide a more details. What auth items?
Do you use any of Yii class? If so, you can write your own one extending from it and add as many fields (properties) as you want.
Example:
class LinkListPager extends CBasePager
{
public $maxButtonCount = 10;
public $nextPageLabel;
public $prevPageLabel;
}
I’m extending here a Yii-build in class named CBasePager to my own class LinkListPager and I’m adding three new fields (properties) that are not defined in base class (CBasePager). I can then access them for example like this:
$llPager = new LinkListPager;
$llPager->nextPageLabel = 'Next Pagina';
but, of course, I can also access fields that are defined in base class (CBasePager), though my own class doesn’t have them - it extends from base class, so copies them:
$llPager = new LinkListPager;
$llPager->currentPage = 2;