/** * Renders a user permissions view. * * @return string */ public static function userPermissionsOutput($model, $attribute) { $html = ''; $html .= '<div class="html-tree">'; $html .= AuthHelper::buildHtmlTree($model, $attribute, AuthHelper::getPermissions()); $html .= '</div>'; return $html; }
/** * Renders a user permissions input. * * @return $this the field object itself */ public function userPermissionsInput() { $input = ''; $input .= '<div class="html-tree">'; $input .= AuthHelper::buildHtmlTreeInput($this->model, $this->attribute, AuthHelper::getPermissions()); $input .= '</div>'; $this->parts['{input}'] = $input; return $this; }