mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-07 15:57:35 +01:00
33 lines
598 B
PHP
33 lines
598 B
PHP
<?php
|
|
|
|
/**
|
|
* @link https://www.yiiframework.com/
|
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
|
* @license https://www.yiiframework.com/license/
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace yiiunit\data\ar;
|
|
|
|
use yii\base\InvalidArgumentException;
|
|
|
|
/**
|
|
* @property int $attr1
|
|
* @property int $attr2
|
|
*/
|
|
class NoAutoLabels extends ActiveRecord
|
|
{
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'attr1' => 'Label for attr1',
|
|
];
|
|
}
|
|
|
|
public function generateAttributeLabel($name)
|
|
{
|
|
throw new InvalidArgumentException('Label not defined!');
|
|
}
|
|
}
|