Skip to content
Snippets Groups Projects

Issue #3321157: Fix Coding Standard Issue

13 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
31 27 class JCarouselFormatter extends ImageFormatter implements ContainerFactoryPluginInterface {
32 28
33 29 /**
34 * jCarousel Skin Manager.
30 * JCarousel Skin Manager.
  • 58 54 * The current user.
    59 55 * @param \Drupal\Core\Entity\EntityStorageInterface $image_style_storage
    60 56 * The image style storage.
    61 * @param \Drupal\jcarousel\jCarouselSkinsManager $skins_manager
    57 * @param \Drupal\jcarousel\JCarouselSkinsManager $skins_manager
    62 58 * Jcarousel Skin manager.
  • 75 75 The jCarousel module is most commonly used with the Views module to turn
    76 76 listings of images or other content into a carousel.
    77 77
    78 1) Add a new view at Administration -> Structure -> Views (admin/structure/views).
    78 1) Add a new view at Administration -> Structure -> Views
    79 (admin/structure/views).
  • 75 75 The jCarousel module is most commonly used with the Views module to turn
    76 76 listings of images or other content into a carousel.
    77 77
    78 1) Add a new view at Administration -> Structure -> Views (admin/structure/views).
    78 1) Add a new view at Administration -> Structure -> Views
    79 (admin/structure/views).
    79 80
    80 81 2) Change the "Display format" of the view to "jCarousel". Click the
    81 82 "Continue & Edit" button to configure the rest of the View.
    82 83
    83 3) Enable views ajax and use special jCarousel pager if you need preload. jCarousel not compatible with standard pages.
    84 3) Enable views ajax and use special jCarousel pager if you need preload.
    85 jCarousel not compatible with standard pages.
  • 97 99
    98 100 The jcarousel_add function is deprecated in favor to Drupal 8 render API usage.
    99 101
    100 If you need to use jCarousel over hardcoded images list you can enable global load of jCarousel library and configure
    101 each list via data atributes
    102 If you need to use jCarousel over hardcoded images list you can enable global
    103 load of jCarousel library and configure each list via data atributes
  • 111 114 -------
    112 115
    113 116 Skin implementation
    114 Please add file MYMODULE.jcarousel_skins.yml into module or MYTHEME.jcarousel_skins.yml into theme
    117 Please add file MYMODULE.jcarousel_skins.yml into module or
    118 MYTHEME.jcarousel_skins.yml into theme
  • 128 $images = [
    129 'http://sorgalla.com/jcarousel/examples/_shared/img/img1.jpg',
    130 'http://sorgalla.com/jcarousel/examples/_shared/img/img2.jpg',
    131 'http://sorgalla.com/jcarousel/examples/_shared/img/img3.jpg',
    132 'http://sorgalla.com/jcarousel/examples/_shared/img/img4.jpg',
    133 'http://sorgalla.com/jcarousel/examples/_shared/img/img5.jpg',
    134 'http://sorgalla.com/jcarousel/examples/_shared/img/img6.jpg',
    135 ];
    136 $items_list = [];
    137 foreach ($images as $image) {
    138 $items_list[] = [
    139 '#theme' => 'image',
    140 '#uri' => $image,
    141 '#width' => '150px',
    142 '#height' => '100px',
    143 '#alt' => t('Image alt'),
  • 19 20 $jcarousel_path = _jcarousel_get_library_path('jcarousel');
    20 21
    21 22 if (!$jcarousel_path) {
    22 $url = Url::fromUri(JCAROUSEL_WEBSITE_URL);
    23 $url = Url::fromUri(JCarouselApiInterface::JCAROUSEL_WEBSITE_URL);
    23 24 $link = Link::fromTextAndUrl(t('jCarousel JavaScript file'), $url)->toString();
    24 25
    25 26 $requirements['jcarousel_js'] = [
    26 27 'title' => t('jCarousel JavaScript file'),
    27 28 'value' => t('Not Installed'),
    28 29 'severity' => REQUIREMENT_ERROR,
    29 'description' => t('You need to <a href=":url">download</a> the @jcarousel and extract the entire contents of the archive into the %path directory in your Drupal installation directory.', ['@jcarousel' => $link, '%path' => 'libraries/jcarousel', ':url' => 'https://github.com/jsor/jcarousel/releases/latest']),
    30 'description' => t('You need to <a href=":url">download</a> the
    31 @jcarousel and extract the entire contents of the archive into the
  • 128 129 '#template' => "{{ php_code|raw}}",
    129 130 '#context' => [
    130 131 'php_code' => highlight_string($code, TRUE),
    131 ]
    132 ],
    132 133 ];
    133 134
    134 135 return $build;
    135 136 }
    136 137
    138 /**
    139 * Implements a vertical help function.
  • 487 499 * @return array
    488 500 * An array of JS and CSS files, suitable for inclusion as an #attached array.
    489 501 *
    490 * @deprecated Please use render arrays with element theme 'jcarousel' instead.
    502 * Please use render arrays with element theme 'jcarousel' instead.
  • 13 13 options:
    14 14 _theme: ajax_base_page
    15 15 requirements:
    16 # todo: add a comment about why there is no access restriction
  • Lucien Chalom added 2 commits

    added 2 commits

    • 0bf82883 - spelling and documentation fixes
    • 5ba6bd95 - upper and lowercase fixes

    Compare with previous version

  • 95 90 $view->dom_id = $dom_id;
    96 91
    97 92 $context = new RenderContext();
    98 $preview = $this->renderer->executeInRenderContext($context, function () use ($view, $display_id, $args) {
    93 $this->renderer->executeInRenderContext($context, function () use ($view, $display_id, $args) {
  • 197 193 '#type' => 'fieldset',
    198 '#title' => t('Advanced'),
    194 '#title' => $this->t('Advanced'),
    199 195 '#collapsible' => TRUE,
    200 196 '#collapsed' => TRUE,
    201 197 '#parents' => ['style_options'],
    202 198 ];
    203 199 $element['advanced']['animation'] = [
    204 200 '#type' => 'textfield',
    205 '#title' => t('Animation speed'),
    201 '#title' => $this->t('Animation speed'),
    206 202 '#size' => 10,
    207 203 '#maxlength' => 10,
    208 204 '#default_value' => $this->getSetting('animation'),
    209 '#description' => t('The speed of the scroll animation as string in jQuery terms ("slow" or "fast") or milliseconds as integer (See <a href="http://api.jquery.com/animate/">jQuery Documentation</a>).'),
    205 '#description' => $this->t('The speed of the scroll animation as string in jQuery terms ("slow" or "fast") or milliseconds as integer (See <a href="http://api.jquery.com/animate/">jQuery Documentation</a>).'),
  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 40383875 - Improved some comments; changed the SPDX identifier for the module license,...

    Compare with previous version

  • added 1 commit

    • 559e1ce2 - Fixed some of the reported warnings/errors

    Compare with previous version

  • added 1 commit

    • 0f7bea08 - Improved documentation comments and other comments

    Compare with previous version

  • Please register or sign in to reply
    Loading