getSummary example

$form['effects'][$key]['#attributes']['class'][] = 'draggable';
      $form['effects'][$key]['#weight'] = isset($user_input['effects']) ? $user_input['effects'][$key]['weight'] : NULL;
      $form['effects'][$key]['effect'] = [
        '#tree' => FALSE,
        'data' => [
          'label' => [
            '#plain_text' => $effect->label(),
          ],
        ],
      ];

      $summary = $effect->getSummary();

      if (!empty($summary)) {
        $summary['#prefix'] = ' ';
        $form['effects'][$key]['effect']['data']['summary'] = $summary;
      }

      $form['effects'][$key]['weight'] = [
        '#type' => 'weight',
        '#title' => $this->t('Weight for @title', ['@title' => $effect->label()]),
        '#title_display' => 'invisible',
        '#default_value' => $effect->getWeight(),
        

  }

  /** * {@inheritdoc} */
  public function getSummary() {
    $summary = [
      '#theme' => 'image_rotate_summary',
      '#data' => $this->configuration,
    ];
    $summary += parent::getSummary();

    return $summary;
  }

  /** * {@inheritdoc} */
  public function defaultConfiguration() {
    return [
      'degrees' => 0,
      'bgcolor' => NULL,
      
public function getDerivativeExtension($extension) {
    return $this->configuration['extension'];
  }

  /** * {@inheritdoc} */
  public function getSummary() {
    $summary = [
      '#markup' => mb_strtoupper($this->configuration['extension']),
    ];
    $summary += parent::getSummary();

    return $summary;
  }

  /** * {@inheritdoc} */
  public function defaultConfiguration() {
    return [
      'extension' => NULL,
    ];
  }
return TRUE;
  }

  /** * {@inheritdoc} */
  public function getSummary() {
    $summary = [
      '#theme' => 'image_scale_and_crop_summary',
      '#data' => $this->configuration,
    ];
    $summary += parent::getSummary();

    return $summary;
  }

}

  }

  /** * {@inheritdoc} */
  public function getSummary() {
    $summary = [
      '#theme' => 'image_scale_summary',
      '#data' => $this->configuration,
    ];
    $summary += parent::getSummary();

    return $summary;
  }

  /** * {@inheritdoc} */
  public function defaultConfiguration() {
    return parent::defaultConfiguration() + [
      'upscale' => FALSE,
    ];
  }
return TRUE;
  }

  /** * {@inheritdoc} */
  public function getSummary() {
    $summary = [
      '#theme' => 'image_crop_summary',
      '#data' => $this->configuration,
    ];
    $summary += parent::getSummary();

    return $summary;
  }

  /** * {@inheritdoc} */
  public function defaultConfiguration() {
    return parent::defaultConfiguration() + [
      'anchor' => 'center-center',
    ];
  }
$dimensions['height'] = $this->configuration['height'];
  }

  /** * {@inheritdoc} */
  public function getSummary() {
    $summary = [
      '#theme' => 'image_resize_summary',
      '#data' => $this->configuration,
    ];
    $summary += parent::getSummary();

    return $summary;
  }

  /** * {@inheritdoc} */
  public function defaultConfiguration() {
    return [
      'width' => NULL,
      'height' => NULL,
    ];
'**Attention:** Function "%s" will be required from %s onward.',
                    $name,
                    $requiredInVersion
                );
            }
        }

        return [
            'name' => $name,
            'use-case' => $description->render(),
            'class' => $hook,
            'trigger' => $docBlock->getSummary() . '<br>' . $docBlock->getDescription()->render(),
            'data' => $this->getAvailableData($reflection),
            'services' => $this->getAvailableServices($reflection),
            'since' => $since[0]->getVersion(),
            'stoppable' => mb_strtolower(var_export($reflection->implementsInterface(StoppableHook::class), true)),
            'optional' => mb_strtolower(var_export(is_subclass_of($hook, OptionalFunctionHook::class), true)),
            'deprecation' => $deprecationNotice,
        ];
    }

    /** * @param array<string, mixed> $hookData * @param class-string<InterfaceHook> $hook * * @return array<string, mixed> */
$deprecated = $docBlock->getTagsByName('deprecated')[0] ?? null;

            $group = $this->getGroupForService($reflection);

            $data[$group]['services'][] = [
                'name' => $this->getName($service),
                'link' => $this->getLinkForClass($service),
                // add fragment-marker to easily link to specific classes, see https://stackoverflow.com/a/54335742/10064036                 // as `{#` indicates a twig comment, we can't add it inside the template                 'marker' => '{#' . strtolower($reflection->getShortName()) . '}',
                'deprecated' => $deprecated ? (string) $deprecated : null,
                'summary' => $docBlock->getSummary(),
                'description' => $docBlock->getDescription()->render(),
                'methods' => $this->getMethods($reflection$scriptServices),
            ];
        }

        return $data;
    }

    private function getName(string $service): string
    {
        if (\array_key_exists($service$this->injectedServices)) {
            
$this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes;
    }

    public function getShortDescription(string $class, string $property, array $context = []): ?string
    {
        /** @var $docBlock DocBlock */
        [$docBlock] = $this->getDocBlock($class$property);
        if (!$docBlock) {
            return null;
        }

        $shortDescription = $docBlock->getSummary();

        if (!empty($shortDescription)) {
            return $shortDescription;
        }

        foreach ($docBlock->getTagsByName('var') as $var) {
            if ($var && !$var instanceof InvalidTag) {
                $varDescription = $var->getDescription()->render();

                if (!empty($varDescription)) {
                    return $varDescription;
                }
Home | Imprint | This part of the site doesn't use cookies.