Files
yii2/tests/data/ar/NoAutoLabels.php
2023-10-23 11:26:59 -03:00

28 lines
548 B
PHP

<?php
/**
* @link https://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license https://www.yiiframework.com/license/
*/
namespace yiiunit\data\ar;
/**
* @property int $attr1
* @property int $attr2
*/
class NoAutoLabels extends ActiveRecord
{
public function attributeLabels()
{
return [
'attr1' => 'Label for attr1',
];
}
public function generateAttributeLabel($name): never
{
throw new \yii\base\InvalidArgumentException('Label not defined!');
}
}