Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -37,7 +37,7 @@ function responsive_image_help($route_name, RouteMatchInterface $route_match) {
|
|||
$output .= '<dt>' . t('Breakpoint groups: viewport sizing vs art direction') . '</dt>';
|
||||
$output .= '<dd>' . t('The breakpoint group typically only needs a single breakpoint with an empty media query in order to do <em>viewport sizing.</em> Multiple breakpoints are used for changing the crop or aspect ratio of images at different viewport sizes, which is often referred to as <em>art direction.</em> Once you select a breakpoint group, you can choose which breakpoints to use for the responsive image style. By default, the option <em>do not use this breakpoint</em> is selected for each breakpoint. See the <a href=":breakpoint_help">help page of the Breakpoint module</a> for more information.', array(':breakpoint_help' => \Drupal::url('help.page', array('name' => 'breakpoint')))) . '</dd>';
|
||||
$output .= '<dt>' . t('Breakpoint settings: sizes vs image styles') . '</dt>';
|
||||
$output .= '<dd>' . t('While you have the option to provide only image style per breakpoint, the sizes option allows you to provide more options to browsers as to which image file it can display, even when using multiple breakpoints for art direction. Breakpoints are defined in the configuration files of the theme.</dd>');
|
||||
$output .= '<dd>' . t('While you have the option to provide only one image style per breakpoint, the sizes option allows you to provide more options to browsers as to which image file it can display, even when using multiple breakpoints for art direction. Breakpoints are defined in the configuration files of the theme.</dd>');
|
||||
$output .= '<dt>' . t('Sizes field') . '</dt>';
|
||||
$output .= '<dd>' . t('Once the sizes option is selected, you can let the browser know the size of this image in relation to the site layout, using the <em>Sizes</em> field. For a hero image that always fills the entire screen, you could simply enter 100vw, which means 100% of the viewport width. For an image that fills 90% of the screen for small viewports, but only fills 40% of the screen when the viewport is larger than 40em (typically 640px), you could enter "(min-width: 40em) 40vw, 90vw" in the Sizes field. The last item in the comma-separated list is the smallest viewport size: other items in the comma-separated list should have a media condition paired with an image width. <em>Media conditions</em> are similar to a media query, often a min-width paired with a viewport width using em or px units: e.g. (min-width: 640px) or (min-width: 40em). This is paired with the <em>image width</em> at that viewport size using px, em or vw units. The vw unit is viewport width and is used instead of a percentage because the percentage always refers to the width of the entire viewport.</dd>');
|
||||
$output .= '<dt>' . t('Image styles for sizes') . '</dt>';
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\Element\ResponsiveImage.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image\Element;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\Entity\ResponsiveImageStyle.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image\Entity;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\Plugin\Field\FieldFormatter\ResponsiveImageFormatter.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image\Plugin\Field\FieldFormatter;
|
||||
|
||||
use Drupal\Core\Cache\Cache;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\ResponsiveImageStyleForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image;
|
||||
|
||||
use Drupal\breakpoint\BreakpointManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\ResponsiveImageStyleInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\ResponsiveImageStyleListBuilder.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\Tests\ResponsiveImageAdminUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\Tests\ResponsiveImageFieldDisplayTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image\Tests;
|
||||
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
|
@ -13,6 +8,7 @@ use Drupal\image\Entity\ImageStyle;
|
|||
use Drupal\node\Entity\Node;
|
||||
use Drupal\file\Entity\File;
|
||||
use Drupal\responsive_image\Plugin\Field\FieldFormatter\ResponsiveImageFormatter;
|
||||
use Drupal\responsive_image\Entity\ResponsiveImageStyle;
|
||||
use Drupal\user\RoleInterface;
|
||||
|
||||
/**
|
||||
|
@ -60,7 +56,7 @@ class ResponsiveImageFieldDisplayTest extends ImageFieldTestBase {
|
|||
));
|
||||
$this->drupalLogin($this->adminUser);
|
||||
// Add responsive image style.
|
||||
$this->responsiveImgStyle = entity_create('responsive_image_style', array(
|
||||
$this->responsiveImgStyle = ResponsiveImageStyle::create(array(
|
||||
'id' => 'style_one',
|
||||
'label' => 'Style One',
|
||||
'breakpoint_group' => 'responsive_image_test_module',
|
||||
|
@ -166,7 +162,7 @@ class ResponsiveImageFieldDisplayTest extends ImageFieldTestBase {
|
|||
* File scheme to use.
|
||||
* @param bool $empty_styles
|
||||
* If true, use an empty string for image style names.
|
||||
* Defaults to false.
|
||||
* Defaults to false.
|
||||
*/
|
||||
protected function doTestResponsiveImageFieldFormatters($scheme, $empty_styles = FALSE) {
|
||||
/** @var \Drupal\Core\Render\RendererInterface $renderer */
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image\Tests\ResponsiveImageFieldUiTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image\Tests;
|
||||
|
||||
|
||||
use Drupal\field_ui\Tests\FieldUiTestTrait;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
use Drupal\responsive_image\Entity\ResponsiveImageStyle;
|
||||
|
||||
/**
|
||||
* Tests the "Responsive Image" formatter settings form.
|
||||
|
@ -65,7 +61,7 @@ class ResponsiveImageFieldUiTest extends WebTestBase {
|
|||
$this->assertText("Select a responsive image style.", 'The expected summary is displayed.');
|
||||
|
||||
// Create responsive image styles.
|
||||
$responsive_image_style = entity_create('responsive_image_style', array(
|
||||
$responsive_image_style = ResponsiveImageStyle::create(array(
|
||||
'id' => 'style_one',
|
||||
'label' => 'Style One',
|
||||
'breakpoint_group' => 'responsive_image_test_module',
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\responsive_image_test_module\Plugin\Field\FieldFormatter\ResponsiveImageTestFormatter.
|
||||
*/
|
||||
|
||||
namespace Drupal\responsive_image_test_module\Plugin\Field\FieldFormatter;
|
||||
|
||||
use Drupal\responsive_image\Plugin\Field\FieldFormatter\ResponsiveImageFormatter;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\responsive_image\Unit\ResponsiveImageStyleConfigEntityUnitTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\responsive_image\Unit;
|
||||
|
||||
use Drupal\Core\DependencyInjection\ContainerBuilder;
|
||||
|
|
Reference in a new issue