Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTC-32: Resolve lingering coding standards issues #687

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/drupal-default/particle_theme/includes/admin.theme.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* Functions to support theming admin in the Particle theme.
*/

/**
* Implements hook_preprocess_input().
*/
function particle_preprocess_input(&$variables) {
$variables['variant'] = (string) $variables['attributes']['type'];
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* @file
* Hooks related to Aggregator funtionality.
*/

use Drupal\node\NodeInterface;
Expand All @@ -12,7 +13,7 @@ use Drupal\Component\Utility\Html;
*/
function particle_preprocess_aggregator_item(&$variables, $hook) {
// Don't go looking for a manage display tab, there is none as
// aggregator_items are not being exposed to the field UI
// aggregator_items are not being exposed to the field UI.
$timeStamp = $variables['elements']['#aggregator_item']->get('timestamp')->value;
$variables['feed'] = $variables['elements']['#aggregator_item']->get('fid')->entity->title->value;
$variables['adapted_time'] = date('M-d', $timeStamp);
Expand All @@ -22,8 +23,8 @@ function particle_preprocess_aggregator_item(&$variables, $hook) {
* Implements template_preprocess_hook().
*/
function particle_preprocess_aggregator_feed(&$variables) {
// sorts based on the key of its elements
// $AggregatorArray = $variables['content']['items'];
// Sorts based on the key of its elements
// $AggregatorArray = $variables['content']['items'];.
if ($variables['elements']['#view_mode'] === "utc_summary") {
ksort($variables['content']['items']);
}
Expand Down
3 changes: 3 additions & 0 deletions apps/drupal-default/particle_theme/includes/form.theme.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ declare(strict_types = 1);

use Drupal\Core\Form\FormStateInterface;

/**
* Implements hook_form_layout_builder_add_block_alter().
*/
function particle_form_layout_builder_add_block_alter(array &$form, FormStateInterface $form_state): void {
// Make the block title a hidden element and generate a UUID for the block
// title if one is not already provided.
Expand Down
2 changes: 1 addition & 1 deletion apps/drupal-default/particle_theme/includes/misc.theme.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

/**
* add body class to error pages for background change.
* Add body class to error pages for background change.
*/
function particle_preprocess_html(&$variables) {
$statusCode = Drupal::request()->query->get('_exception_statuscode');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@

/**
* @file
* Hooks related to page attachments.
*/

/**
* Implements hook_page_attachments_alter().
*/
function particle_page_attachments_alter(array &$attachments) {

/**
* Attach custom CSS file
*/
// Attach custom CSS file.
if (theme_get_setting('themag_use_custom_css_file')) {
$attachments['#attached']['library'][] = 'particle/custom-css';
}

/**
* Attach custom JS file
*/
// Attach custom JS file.
if (theme_get_setting('particle_use_custom_js_file')) {
$attachments['#attached']['library'][] = 'particle/custom-js';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* @file
* Hooks related to general theming.
*/

/**
Expand Down