Newer
Older
<?php
namespace Drupal\uw_cfg_common\Service;
use Drupal\Core\Entity\EntityInterface;
use Drupal\node\NodeInterface;
* Interface UWServiceInterface.
*
* Interface that is collection of common functions used in custom blocks.
*
* @package Drupal\uw_cfg_common\Service
interface UWServiceInterface {
/**
* Prepares responsive image.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* Image entity.
* @param string $image_style
* Image style to be used for responsive image.
*
* @return array
*/
public function prepareResponsiveImage(EntityInterface $entity, string $image_style): array;
/**
* Prepares teaser.
*
* @param \Drupal\node\NodeInterface $node
* Node entity.
* @param array $variables_to_get
* List of variables to return.
* @param string $teaser_type
* Teaser type.
*
* @return array
* Array of variables and their values.
*/
public function getTeaserContent(NodeInterface $node, array $variables_to_get, string $teaser_type): array;