All Data Structures Functions Variables Pages
ModelMetadataUtilTest.php
1 <?php
2  /*********************************************************************************
3  * Zurmo is a customer relationship management program developed by
4  * Zurmo, Inc. Copyright (C) 2017 Zurmo Inc.
5  *
6  * Zurmo is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  *
13  * Zurmo is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  *
23  * You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive
24  * Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com.
25  *
26  * The interactive user interfaces in original and modified versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  *
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the Zurmo
32  * logo and Zurmo copyright notice. If the display of the logo is not reasonably
33  * feasible for technical reasons, the Appropriate Legal Notices must display the words
34  * "Copyright Zurmo Inc. 2017. All rights reserved".
35  ********************************************************************************/
36 
38  {
39  public function testGlobalMetadata()
40  {
41  $globalMetadata = new GlobalMetadata();
42  $globalMetadata->className = 'Whatever';
43  $globalMetadata->serializedMetadata = serialize(array('stuff', 1));
44  $this->assertTrue($globalMetadata->save());
45  unset($globalMetadata);
46  $globalMetadata = GlobalMetadata::getByClassName('Whatever');
47  $this->assertEquals('a:2:{i:0;s:5:"stuff";i:1;i:1;}', $globalMetadata->serializedMetadata);
48  }
49 
54  {
55  $a = new A();
56  $this->assertTrue ($a->isAttribute('a'));
57  $this->assertFalse($a->isAttribute('newMember'));
58  unset($a);
59 
60  $originalMetadata = A::getMetadata();
61  $metadata = A::getMetadata();
62  $metadata['A']['members'][] = 'newMember';
63  A::setMetadata($metadata);
64 
65  $this->assertNotEquals($originalMetadata, A::getMetadata());
66  $this->assertEquals ($metadata, A::getMetadata());
67 
68  $a = new A();
69  $this->assertTrue($a->isAttribute('a'));
70  $this->assertTrue($a->isAttribute('newMember'));
71  }
72 
77  {
78  $originalMetadata = A::getMetadata();
79  $attributeLabels = array('en' => 'newMember2');
80  ModelMetadataUtil::addOrUpdateMember('A', 'newMember2', $attributeLabels,
81  null, null, null, null, null, false, false, 'Text', array());
82  $metadata = A::getMetadata();
83  $this->assertNotEquals($originalMetadata, $metadata);
84  $this->assertEquals(count($originalMetadata['A']['members']) + 1, count($metadata['A']['members']));
85  $membersCount = count($metadata['A']['members']);
86  $newMember = $metadata['A']['members'][$membersCount - 1];
87  $this->assertEquals('newMember2Cstm', $newMember);
88  $this->assertEquals($originalMetadata['A']['rules'], $metadata['A']['rules']);
89  }
90 
95  {
96  $originalMetadata = A::getMetadata();
97  $attributeLabels = array('en' => 'newMember3');
98  ModelMetadataUtil::addOrUpdateMember('A', 'newMember3', $attributeLabels, 3,
99  null, null, null, null, true, true, 'Text', array());
100  $metadata = A::getMetadata();
101  $this->assertNotEquals($originalMetadata, $metadata);
102  $this->assertEquals(count($originalMetadata['A']['rules']) + 2, count($metadata['A']['rules']));
103  $rulesCount = count($metadata['A']['rules']);
104  $newRule = $metadata['A']['rules'][$rulesCount - 2];
105  $this->assertEquals(array('newMember3Cstm', 'default', 'value' => 3), $newRule);
106  $newRule = $metadata['A']['rules'][$rulesCount - 1];
107  $this->assertEquals(array('newMember3Cstm', 'required'), $newRule);
108  }
109 
114  {
115  $originalMetadata = A::getMetadata();
116  $attributeLabels = array('en' => 'newMember4');
117  ModelMetadataUtil::addOrUpdateMember('A', 'newMember4', $attributeLabels,
118  null, 10, null, null, null, false, false, 'Text', array());
119  $metadata = A::getMetadata();
120  $this->assertNotEquals($originalMetadata, $metadata);
121  $this->assertEquals(count($originalMetadata['A']['rules']) + 1, count($metadata['A']['rules']));
122  $rulesCount = count($metadata['A']['rules']);
123  $newRule = $metadata['A']['rules'][$rulesCount - 1];
124  $this->assertEquals(array('newMember4Cstm', 'length', 'max' => 10), $newRule);
125  }
126 
131  {
132  $originalMetadata = A::getMetadata();
133  $attributeLabels = array('en' => 'newMember5');
134  $mixedRule = array('someRule' , 'value' => 'someValue');
135  ModelMetadataUtil::addOrUpdateMember('A', 'newMember5', $attributeLabels,
136  null, 10, null, null, null, false, false, 'Text', array(), $mixedRule);
137  $metadata = A::getMetadata();
138  $this->assertNotEquals($originalMetadata, $metadata);
139  $this->assertEquals(count($originalMetadata['A']['rules']) + 2, count($metadata['A']['rules']));
140  $rulesCount = count($metadata['A']['rules']);
141  $newRule = $metadata['A']['rules'][$rulesCount - 1];
142  $this->assertEquals(array('newMember5Cstm', 'someRule', 'value' => 'someValue'), $newRule);
143  //Update mixed rule for attribute.
144  $mixedRule = array('someRule' , 'value' => 'someValue2');
145  ModelMetadataUtil::addOrUpdateMember('A', 'newMember5Cstm', $attributeLabels,
146  null, 10, null, null, null, false, false, 'Text', array(), $mixedRule);
147  $metadataUpdated = A::getMetadata();
148  $this->assertNotEquals($originalMetadata, $metadata);
149  $this->assertEquals(count($metadata['A']['rules']), count($metadataUpdated['A']['rules']));
150  $newRule = $metadataUpdated['A']['rules'][$rulesCount - 1];
151  $this->assertEquals(array('newMember5Cstm', 'someRule', 'value' => 'someValue2'), $newRule);
152  }
153 
158  {
159  $originalMetadata = A::getMetadata();
160  $attributeLabels = array('en' => 'newRelation');
161  ModelMetadataUtil::addOrUpdateCustomFieldRelation('A', 'newRelation', $attributeLabels,
162  null, false, false, 'DropDown', 'Things', array('thing 1', 'thing 2'),
163  array('fr' => array('thing 1 fr', 'thing 2 fr')));
164  $metadata = A::getMetadata();
165  $this->assertNotEquals($originalMetadata, $metadata);
166 
167  $this->assertEquals($originalMetadata['A']['rules'], $metadata['A']['rules']);
168 
169  $this->assertEquals(1, count($metadata['A']['relations']));
170  $newRelation = $metadata['A']['relations']['newRelationCstm'];
171  $this->assertEquals(array(RedBeanModel::HAS_ONE, 'OwnedCustomField', RedBeanModel::OWNED,
172  RedBeanModel::LINK_TYPE_SPECIFIC, 'newRelationCstm'), $newRelation);
173  $this->assertEquals(1, count($metadata['A']['customFields']));
174  $this->assertEquals('Things', $metadata['A']['customFields']['newRelationCstm']);
175  }
176 
181  {
182  $thingCustomField = new CustomField();
183  $thingCustomField->value = 'thing 1';
184 
185  $originalMetadata = A::getMetadata();
186  $attributeLabels = array('en' => 'newRelation2');
187  ModelMetadataUtil::addOrUpdateCustomFieldRelation('A', 'newRelation2', $attributeLabels,
188  $thingCustomField, true, false, 'DropDown', 'Things', array('thing 1', 'thing 2'));
189  $metadata = A::getMetadata();
190  $this->assertNotEquals($originalMetadata, $metadata);
191 
192  $this->assertEquals(count($originalMetadata['A']['rules']) + 2, count($metadata['A']['rules']));
193  $rulesCount = count($metadata['A']['rules']);
194  $newRule = $metadata['A']['rules'][$rulesCount - 2];
195  $this->assertEquals('newRelation2Cstm', $newRule[0]);
196  $this->assertEquals('default', $newRule[1]);
197  $this->assertEquals($thingCustomField->value, $newRule['value']->value);
198  $newRule = $metadata['A']['rules'][$rulesCount - 1];
199  $this->assertEquals(array('newRelation2Cstm', 'required'), $newRule);
200 
201  $this->assertEquals(count($originalMetadata['A']['relations']) + 1, count($metadata['A']['relations']));
202  $newRelation = $metadata['A']['relations']['newRelation2Cstm'];
203  $this->assertEquals(array(RedBeanModel::HAS_ONE, 'OwnedCustomField', RedBeanModel::OWNED,
204  RedBeanModel::LINK_TYPE_SPECIFIC, 'newRelation2Cstm'), $newRelation);
205  $this->assertEquals(count($originalMetadata['A']['customFields']) + 1, count($metadata['A']['customFields']));
206  $this->assertEquals('Things', $metadata['A']['customFields']['newRelation2Cstm']);
207  }
208 
212  public function testRemoveAttributes()
213  {
214  $originalMetadata = A::getMetadata();
215 
216  ModelMetadataUtil::removeAttribute('A', 'newMember');
217  $metadata = A::getMetadata();
218  $this->assertNotEquals($originalMetadata, $metadata);
219  $this->assertEquals($originalMetadata['A']['rules'], $metadata['A']['rules']);
220 
221  ModelMetadataUtil::removeAttribute('A', 'newMember2Cstm');
222  $metadata = A::getMetadata();
223  $this->assertNotEquals($originalMetadata, $metadata);
224  $this->assertEquals($originalMetadata['A']['rules'], $metadata['A']['rules']);
225 
226  ModelMetadataUtil::removeAttribute('A', 'newMember3Cstm');
227  $metadata = A::getMetadata();
228  $this->assertNotEquals($originalMetadata, $metadata);
229  $this->assertEquals(count($originalMetadata['A']['rules']) - 2, count($metadata['A']['rules']));
230 
231  ModelMetadataUtil::removeAttribute('A', 'newMember4Cstm');
232  $metadata = A::getMetadata();
233  $this->assertNotEquals($originalMetadata, $metadata);
234  $this->assertEquals(count($originalMetadata['A']['rules']) - 3, count($metadata['A']['rules']));
235 
236  ModelMetadataUtil::removeAttribute('A', 'newMember5Cstm');
237  $metadata = A::getMetadata();
238  $this->assertNotEquals($originalMetadata, $metadata);
239  $this->assertEquals(count($originalMetadata['A']['rules']) - 5, count($metadata['A']['rules']));
240 
241  ModelMetadataUtil::removeAttribute('A', 'newRelationCstm');
242  $metadata = A::getMetadata();
243  $this->assertNotEquals($originalMetadata, $metadata);
244  $this->assertEquals(count($originalMetadata['A']['rules']) - 5, count($metadata['A']['rules']));
245 
246  ModelMetadataUtil::removeAttribute('A', 'newRelation2Cstm');
247  $metadata = A::getMetadata();
248  $this->assertNotEquals($originalMetadata, $metadata);
249  $this->assertEquals(count($originalMetadata['A']['rules']) - 7, count($metadata['A']['rules']));
250 
251  ModelMetadataUtil::removeAttribute('A', 'newRelation3Cstm');
252  $metadata = A::getMetadata();
253  $this->assertNotEquals($originalMetadata, $metadata);
254  $this->assertEquals(count($originalMetadata['A']['rules']) - 7, count($metadata['A']['rules']));
255  }
256 
261  {
262  $a = new A();
263  $this->assertFalse($a->isAttribute('isSilly'));
264  unset($a);
265  $attributeLabels = array('en' => 'isSilly');
266  ModelMetadataUtil::addOrUpdateMember('A', 'isSilly', $attributeLabels,
267  null, null, null, null, null, false, false, null, array());
268 
269  $a = new A();
270  $a->a = 1;
271  $this->assertTrue($a->isAttribute('isSillyCstm'));
272  $this->assertTrue($a->validate());
273  $this->assertNull($a->isSillyCstm);
274  unset($a);
275 
276  ModelMetadataUtil::removeAttribute('A', 'isSillyCstm');
277  }
278 
283  {
284  $a = new A();
285  $this->assertFalse($a->isAttribute('isSilly'));
286  unset($a);
287  $attributeLabels = array('en' => 'isSilly');
288  ModelMetadataUtil::addOrUpdateMember('A', 'isSilly', $attributeLabels, 'no',
289  null, null, null, null, false, false, null, array());
290 
291  $a = new A();
292  $a->a = 1;
293  $this->assertTrue($a->isAttribute('isSillyCstm'));
294  $this->assertTrue($a->validate());
295  // Remember, yii default values are applied
296  // on validation if there is no value set.
297  $this->assertEquals('no', $a->isSillyCstm);
298  unset($a);
299 
300  ModelMetadataUtil::removeAttribute('A', 'isSillyCstm');
301  }
302 
307  {
308  $a = new A();
309  $this->assertFalse($a->isAttribute('isSilly'));
310  unset($a);
311  $attributeLabels = array('en' => 'isSilly');
312  ModelMetadataUtil::addOrUpdateMember('A', 'isSilly', $attributeLabels,
313  null, null, null, null, null, true, true, null, array());
314 
315  $a = new A();
316  $a->a = 1;
317  $this->assertTrue($a->isAttribute('isSillyCstm'));
318  $this->assertFalse($a->validate());
319  $a->isSillyCstm = 'yes';
320  $this->assertTrue ($a->validate());
321  unset($a);
322 
323  ModelMetadataUtil::removeAttribute('A', 'isSillyCstm');
324  }
325 
330  {
331  $a = new A();
332  $this->assertFalse($a->isAttribute('isSilly'));
333  unset($a);
334  $attributeLabels = array('en' => 'isSilly');
335  ModelMetadataUtil::addOrUpdateMember('A', 'isSilly', $attributeLabels,
336  'no', null, null, null, null, true, true, null, array());
337 
338  $a = new A();
339  $a->a = 1;
340  $this->assertTrue($a->isAttribute('isSillyCstm'));
341  $this->assertTrue($a->validate());
342  // Remember, yii default values are applied
343  // on validation if there is no value set.
344  $this->assertEquals('no', $a->isSillyCstm);
345  unset($a);
346 
347  ModelMetadataUtil::removeAttribute('A', 'isSillyCstm');
348  }
349 
354  {
355  $a = new A();
356  $this->assertFalse($a->isAttribute('isSilly'));
357  unset($a);
358  $attributeLabels = array('en' => 'Is Silly');
359  ModelMetadataUtil::addOrUpdateMember('A', 'isSilly', $attributeLabels,
360  null, 10, null, null, null, false, false, null, array());
361 
363  $a = new A();
364  $a->a = 1;
365  $this->assertTrue($a->isAttribute('isSillyCstm'));
366  $this->assertTrue($a->validate());
367  $a->isSillyCstm = 'abcdefghij';
368  $this->assertTrue($a->validate());
369  $a->isSillyCstm = 'abcdefghijk';
370  $this->assertFalse($a->validate());
371  $errors = $a->getErrors();
372  $this->assertEquals(1, count($errors));
373  $this->assertEquals('Is Silly is too long (maximum is 10 characters).', $errors['isSillyCstm'][0]);
374  unset($a);
375 
376  ModelMetadataUtil::removeAttribute('A', 'isSillyCstm');
377  }
378 
383  {
384  $a = new A();
385  $this->assertFalse($a->isAttribute('fruit'));
386  unset($a);
387 
388  $appleCustomField = new CustomField();
389  $appleCustomField->value = 'apple';
390  $appleCustomField->data = CustomFieldData::getByName('Fruit');
391  $this->assertTrue($appleCustomField->save());
392 
393  $fruits = array('apple', 'orange', 'grape', 'banana', 'pear');
394  $attributeLabels = array('en' => 'fruit');
395  ModelMetadataUtil::addOrUpdateCustomFieldRelation('A', 'fruit', $attributeLabels,
396  null, false, false, 'DropDown', 'Fruit', $fruits);
397 
398  $a = new A();
399  $a->a = 1;
400  $this->assertTrue($a->isAttribute('fruitCstm'));
401  $this->assertTrue($a->validate());
402  unset($a);
403 
404  ModelMetadataUtil::removeAttribute('A', 'fruitCstm');
405  }
406 
411  {
412  $a = new A();
413  $this->assertFalse($a->isAttribute('fruit'));
414  unset($a);
415 
416  $appleCustomField = new CustomField();
417  $appleCustomField->value = 'apple';
418  $appleCustomField->data = CustomFieldData::getByName('Fruit');
419  $this->assertTrue($appleCustomField->save());
420  $attributeLabels = array('en' => 'fruit');
421  ModelMetadataUtil::addOrUpdateCustomFieldRelation('A', 'fruit', $attributeLabels,
422  $appleCustomField, false, false, 'DropDown', 'Fruit', null, null, 'CustomField', false);
423 
424  $a = new A();
425  $a->a = 1;
426  $this->assertTrue($a->isAttribute('fruitCstm'));
427  $this->assertTrue($a->validate());
428  $this->assertEquals('apple', $a->fruitCstm->value);
429  $a->fruitCstm->value = '';
430  $this->assertTrue($a->validate());
431  unset($a);
432 
433  ModelMetadataUtil::removeAttribute('A', 'fruitCstm');
434  }
435 
440  {
441  $a = new A();
442  $this->assertFalse($a->isAttribute('fruit'));
443  unset($a);
444 
445  $appleCustomField = new CustomField();
446  $appleCustomField->value = 'apple';
447  $appleCustomField->data = CustomFieldData::getByName('Fruit');
448  $this->assertTrue($appleCustomField->save());
449  $attributeLabels = array('en' => 'Fruit');
450  ModelMetadataUtil::addOrUpdateCustomFieldRelation('A', 'fruit', $attributeLabels,
451  null, true, false, 'DropDown', 'Fruit', null, null, 'CustomField', false);
452 
453  $a = new A();
454  $a->a = 1;
455  $this->assertTrue($a->isAttribute('fruitCstm'));
456  $this->assertFalse($a->validate());
457  $errors = $a->getErrors();
458  $this->assertEquals(1, count($errors));
459  $this->assertEquals('Fruit cannot be blank.', $errors['fruitCstm'][0]);
460  $a->fruitCstm->value = 'apple';
461  $this->assertTrue($a->validate());
462  $this->assertEquals('apple', $a->fruitCstm->value);
463  unset($a);
464 
465  //Now test setting from post
466  $fakePost = array('a' => '1', 'fruitCstm' => array('value' => '')); //using empty string, not null for value since
467  //this properly mimics the post value for empty.
468  $a = new A();
469  $a->setAttributes($fakePost);
470  $this->assertFalse($a->validate());
471  $errors = $a->getErrors();
472  $this->assertEquals(1, count($errors));
473  $this->assertEquals('Fruit cannot be blank.', $errors['fruitCstm'][0]);
474 
475  ModelMetadataUtil::removeAttribute('A', 'fruitCstm');
476  }
477 
482  {
483  $a = new A();
484  $this->assertFalse($a->isAttribute('fruit'));
485  unset($a);
486 
487  $appleCustomField = new CustomField();
488  $appleCustomField->value = 'apple';
489  $appleCustomField->data = CustomFieldData::getByName('Fruit');
490  $this->assertTrue($appleCustomField->save());
491  $attributeLabels = array('en' => 'fruit');
492  ModelMetadataUtil::addOrUpdateCustomFieldRelation('A', 'fruit', $attributeLabels,
493  $appleCustomField, true, false, 'DropDown', 'Fruit', null, null, 'CustomField', false);
494 
495  $a = new A();
496  $a->a = 1;
497  $this->assertTrue($a->isAttribute('fruitCstm'));
498  $this->assertTrue($a->validate());
499  // Remember, yii default values are applied
500  // on validation if there is no value set.
501  $this->assertEquals('apple', $a->fruitCstm->value);
502  unset($a);
503 
505  }
506 
511  {
512  //Testing addOrUpdateMember merges correctly.
513  $originalMetadata = A::getMetadata();
514  $this->assertEquals($originalMetadata['A']['labels']['newMember2Cstm'], array('en' => 'newMember2'));
515  $attributeLabels = array('fr' => 'somethingDifferent');
516  ModelMetadataUtil::addOrUpdateMember('A', 'newMember2', $attributeLabels,
517  null, null, null, null, null, false, false, 'Text', array());
518  $metadata = A::getMetadata();
519  $this->assertEquals($metadata['A']['labels']['newMember2Cstm'],
520  array('en' => 'newMember2', 'fr' => 'somethingDifferent'));
521 
522  //Testing addOrUpdateRelation merges correctly.
523  //todo: this is covered though by addOrUpdateCustomFieldRelation, but a test for this specifically woulud
524  //be ideal.
525 
526  //Testing addOrUpdateCustomFieldRelation merges correctly.
527  $originalMetadata = A::getMetadata();
528  $this->assertEquals($originalMetadata['A']['labels']['fruitCstm'], array('en' => 'fruit'));
529  $attributeLabels = array('fr' => 'somethingDifferent2');
530  $appleCustomField = new CustomField();
531  $appleCustomField->value = 'apple';
532  $appleCustomField->data = CustomFieldData::getByName('Fruit');
533  $this->assertTrue($appleCustomField->save());
534  ModelMetadataUtil::addOrUpdateCustomFieldRelation('A', 'fruit', $attributeLabels,
535  $appleCustomField, true, false, 'DropDown', 'Fruit', null, null, 'CustomField', false);
536  $metadata = A::getMetadata();
537  $this->assertEquals($metadata['A']['labels']['fruitCstm'],
538  array('en' => 'fruit', 'fr' => 'somethingDifferent2'));
539  }
540 
545  {
546  $a = new A();
547  $this->assertTrue($a->isAttribute('fruitCstm'));
548  unset($a);
549 
550  $appleCustomField = new CustomField();
551  $appleCustomField->value = 'apple';
552  $appleCustomField->data = CustomFieldData::getByName('Fruit');
553  $this->assertTrue($appleCustomField->save());
554  $attributeLabels = array('en' => 'fruit');
555  ModelMetadataUtil::addOrUpdateCustomFieldRelation('A', 'fruit', $attributeLabels,
556  $appleCustomField, true, false, 'DropDown', 'Fruit', array('apple', 'grape', 'orange'),
557  array('fr' => array('appleFr', 'grapeFr', 'orangeFr'), 'de' => array('', 'grape', '')), 'CustomField', false);
558 
559  $a = new A();
560  $a->a = 1;
561  $this->assertTrue($a->isAttribute('fruitCstm'));
562  $this->assertTrue($a->validate());
563  $this->assertEquals('apple', $a->fruitCstm->value);
564  $compareData = array('fr' => array('appleFr', 'grapeFr', 'orangeFr'), 'de' => array('', 'grape', ''));
565  $this->assertEquals($compareData, unserialize($a->fruitCstm->data->serializedLabels));
566  unset($a);
567  ModelMetadataUtil::removeAttribute('A', 'fruitCstm');
568  }
569  }
570 ?>
static addOrUpdateCustomFieldRelation($modelClassName, $relationName, $attributeLabels, $defaultValue, $isRequired, $isAudited, $elementType, $customFieldDataName, $customFieldDataData=null, $customFieldDataLabels=null, $relationModelClassName= 'OwnedCustomField', $owned=true)
testUsingNonRequiredCustomFieldRelationWithWithoutDefaultValue()
const OWNED
Definition: BeanModel.php:87
static getByClassName($className)
static forgetAll()
const HAS_ONE
Definition: BeanModel.php:64
static addOrUpdateMember($modelClassName, $memberName, $attributeLabels, $defaultValue, $maxLength, $minValue, $maxValue, $precision, $isRequired, $isAudited, $elementType, array $partialTypeRule, array $mixedRule=null)
Definition: A.php:37
static getByName($name, $shouldCache=true)
static removeAttribute($modelClassName, $attributeName)
static getMetadata()
static setMetadata(array $metadata)
Generated on Fri Jun 5 2020 07:10:31