commit 1a713ee7b1642ce917679882dd385651a19d74ad Author: Joel Pittet Date: Sat Mar 30 13:44:00 2013 -0700 1898468-14 doc cleanup diff --git a/core/modules/user/templates/user-admin-permissions.html.twig b/core/modules/user/templates/user-admin-permissions.html.twig index d70bcf8..0e19b14 100644 --- a/core/modules/user/templates/user-admin-permissions.html.twig +++ b/core/modules/user/templates/user-admin-permissions.html.twig @@ -4,7 +4,8 @@ * Default theme implementation for the administer permissions page. * * Available variables: - * - system_compact_link: A rendered link to show or hide inline help descriptions. + * - system_compact_link: A rendered link to show or hide inline help + * descriptions. * - table: table of permissions * - attributes: An array of html attributes to apply to the table tag. * - form: Rendered form children elements. diff --git a/core/modules/user/templates/user-permission-description.html.twig b/core/modules/user/templates/user-permission-description.html.twig index 9a7d79a..9285fb6 100644 --- a/core/modules/user/templates/user-permission-description.html.twig +++ b/core/modules/user/templates/user-permission-description.html.twig @@ -10,8 +10,8 @@ * - hide: Indicates whether or not the permission description was requested * to be hidden rather than shown. * - * @see template_preprocess - * @see template_preprocess_user_permission_description + * @see template_preprocess() + * @see template_preprocess_user_permission_description() * * @ingroup themeable */ diff --git a/core/modules/user/templates/user-picture.html.twig b/core/modules/user/templates/user-picture.html.twig index 4fcd726..1a70920 100644 --- a/core/modules/user/templates/user-picture.html.twig +++ b/core/modules/user/templates/user-picture.html.twig @@ -9,8 +9,8 @@ * - account: Array of account information. Potentially unsafe. Be sure to * check_plain() before use. * - * @see template_preprocess - * @see template_preprocess_user_picture + * @see template_preprocess() + * @see template_preprocess_user_picture() * * @ingroup themeable */ diff --git a/core/modules/user/templates/user-profile.html.twig b/core/modules/user/templates/user-profile.html.twig index 6410d9c..a23d69d 100644 --- a/core/modules/user/templates/user-profile.html.twig +++ b/core/modules/user/templates/user-profile.html.twig @@ -21,12 +21,12 @@ * variable is defined; e.g., account.field_example has a variable * field_example defined. * - * @see template_preprocess - * @see template_preprocess_user_profile + * @see template_preprocess() + * @see template_preprocess_user_profile() * * @ingroup themeable */ #} -
+ {{ user_profile }}
diff --git a/core/modules/user/templates/user-signature.html.twig b/core/modules/user/templates/user-signature.html.twig index 72962f2..024cd0a 100644 --- a/core/modules/user/templates/user-signature.html.twig +++ b/core/modules/user/templates/user-signature.html.twig @@ -1,5 +1,6 @@ {# /** + * @file * Default theme implementation for a user signature. * * Available variables: @@ -8,8 +9,8 @@ * * @TODO Use a general wrapper instead of this file. * - * @see template_preprocess - * @see template_preprocess_user_signature + * @see template_preprocess() + * @see template_preprocess_user_signature() * * @ingroup themeable */ diff --git a/core/modules/user/templates/user.html.twig b/core/modules/user/templates/user.html.twig index 06a1e9a..c85b191 100644 --- a/core/modules/user/templates/user.html.twig +++ b/core/modules/user/templates/user.html.twig @@ -21,11 +21,12 @@ * field language, e.g. $account->field_example['en'], thus overriding any * language negotiation rule that was previously applied. * + * @see template_preprocess() * @see template_preprocess_user() * * @ingroup themeable */ #} -
+
{{ content }}
diff --git a/core/modules/user/templates/username.html.twig b/core/modules/user/templates/username.html.twig index c11c7ec..c76eaa7 100644 --- a/core/modules/user/templates/username.html.twig +++ b/core/modules/user/templates/username.html.twig @@ -14,8 +14,8 @@ * parameter if linking the user's name to the user's page. * - attributes: An array of attributes if not linking to the user's page. * - * @see template_preprocess - * @see template_preprocess_username + * @see template_preprocess() + * @see template_preprocess_username() * * @ingroup themeable */ @@ -29,4 +29,4 @@ {% set attributes.class = attributes.class|merge(["myclass"]) %} #} {{ name }}{{ extra }} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc index a51fa50..3804763 100644 --- a/core/modules/user/user.admin.inc +++ b/core/modules/user/user.admin.inc @@ -777,11 +777,11 @@ function user_admin_permissions_submit($form, &$form_state) { /** * Preprocess variables for the administer permissions page. * - * @param $variables + * Default template: user-admin-permissions.html.twig. + * + * @param array $variables * An associative array containing: * - form: A render element representing the form. - * - * @ingroup themeable */ function template_preprocess_user_admin_permissions(&$variables) { $form = $variables['form']; @@ -819,7 +819,9 @@ function template_preprocess_user_admin_permissions(&$variables) { /** * Default theme implementation for an individual permission description. * - * @param $variables + * Default template: user-permission-description.html.twig. + * + * @param array $variables * An associative array containing: * - permission_item: An associative array representing the permission whose * description is being themed. Useful keys include: @@ -828,8 +830,6 @@ function template_preprocess_user_admin_permissions(&$variables) { * there is one). * - hide: A boolean indicating whether or not the permission description was * requested to be hidden rather than shown. - * - * @ingroup themeable */ function template_preprocess_user_permission_description(&$variables) { $permission_item = $variables['permission_item']; @@ -920,13 +920,13 @@ function user_admin_roles_order_submit($form, &$form_state) { } /** - * Preprocess variables for user-admin-roles template. + * Preprocess variables for user admin roles template. + * + * Default template: user-admin-roles.html.twig. * - * @param $variables + * @param array $variables * An associative array containing: * - form: A render element representing the form. - * - * @ingroup themeable */ function template_preprocess_user_admin_roles(&$variables) { $form = $variables['form']; diff --git a/core/modules/user/user.module b/core/modules/user/user.module index df4c89d..15bf5ff 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -733,13 +733,19 @@ function user_template_preprocess_default_variables_alter(&$variables) { } /** - * Preprocesses variables for theme_username(). + * Preprocesses variables for username. + * + * Default template: username.html.twig. + * + * @param array $variables + * An associative array containing: + * - account: @todo. + * - profile_access: @todo. + * - uid: @todo. * * Modules that make any changes to variables like 'name' or 'extra' must insure * that the final string is safe to include directly in the output by using * check_plain() or filter_xss(). - * - * @see template_process_username() */ function template_preprocess_username(&$variables) { $account = $variables['account']; @@ -1660,7 +1666,7 @@ function user_view_page($account) { * - $page['content']['#user']: * The user account of the profile being viewed. * - * To theme user profiles, copy modules/user/user.tpl.php + * To theme user profiles, copy modules/user/templates/user.html.twig * to your theme directory, and edit it as instructed in that file's comments. * * @param $account @@ -2268,11 +2274,11 @@ function user_build_filter_query(SelectInterface $query) { /** * Preprocess variables for user signature templates. * - * @param $variables + * Default template: user-signature.html.twig. + * + * @param array $variables * An associative array containing: * - signature: The user's signature. - * - * @ingroup themeable */ function template_preprocess_user_signature(&$variables) { $variables['attributes'] = new Attribute(array('class' => array('clear'))); diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc index c64dbf1..2cf3f8c 100644 --- a/core/modules/user/user.pages.inc +++ b/core/modules/user/user.pages.inc @@ -12,7 +12,6 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\HttpKernelInterface; - /** * Form builder; Request a password reset. * @@ -177,12 +176,13 @@ function user_logout() { } /** - * Process variables for user.tpl.php. + * Prepares variables for user template. * - * The $variables array contains the following arguments: - * - $account + * Default template: user.html.twig. * - * @see user.tpl.php + * @param array $variables + * An associative array containing: + * - $account */ function template_preprocess_user(&$variables) { $account = $variables['elements']['#user'];