li3_behaviors\data\model\Behaviors::_initializeBehaviors()

protected static method

Initializes behaviors from the $_actsAs property of the model.

Returns

void

Source

	protected static function _initializeBehaviors() {
		$model = get_called_class();

		if (!empty(static::$_initializedBehaviors[$model])) {
			return;
		}
		static::$_initializedBehaviors[$model] = true;

		$self = $model::_object();

		if (!property_exists($self, '_actsAs')) {
			return;
		}
		foreach (Set::normalize($self->_actsAs) as $name => $config) {
			static::bindBehavior($name, $config ?: []);
		}
	}