|
|
|
@ -422,6 +422,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
|
|
|
|
|
* Returns a value indicating whether the attribute is safe for massive assignments. |
|
|
|
|
* @param string $attribute attribute name |
|
|
|
|
* @return boolean whether the attribute is safe for massive assignments |
|
|
|
|
* @see safeAttributes() |
|
|
|
|
*/ |
|
|
|
|
public function isAttributeSafe($attribute) |
|
|
|
|
{ |
|
|
|
@ -429,6 +430,17 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Returns a value indicating whether the attribute is active in the current scenario. |
|
|
|
|
* @param string $attribute attribute name |
|
|
|
|
* @return boolean whether the attribute is active in the current scenario |
|
|
|
|
* @see activeAttributes() |
|
|
|
|
*/ |
|
|
|
|
public function isAttributeActive($attribute) |
|
|
|
|
{ |
|
|
|
|
return in_array($attribute, $this->activeAttributes(), true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Returns the text label for the specified attribute. |
|
|
|
|
* @param string $attribute the attribute name |
|
|
|
|
* @return string the attribute label |
|
|
|
|