System:Model:setSecurityRule

From Aspen Documentation

Sets a security rule for data coming into a specific field through any other auto-generated model queries.

Since 1.0

Arguments

void setSecurityRule (string $field, string $key, string $value)

field
Current schema field to set security rule on.
key
Security rule name.
value
Value of new security rule.

Returns

This function does not return any values.


Examples

In this example we instruct the model class to allow html content for a specific field. By default all html is disabled. After this point, HTMLPurifier kicks in for filtering the content.

$this->APP->model->setSecurityRule('blog_content', 'allow_html', true);