setDescription example

return [];
    }

    /** * {@inheritdoc} */
    protected function configure()
    {
        $this
            ->setName('sw:rebuild:seo:index')
            ->setDescription('Rebuild the SEO index')
            ->addArgument('shopId', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'The Id of the shop (deprecated)')
            ->addOption('shopId', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The Id of the shop (multiple Ids -> shopId={1,2})')
            ->setHelp('The <info>%command.name%</info> rebuilds the SEO index')
        ;
    }

    /** * {@inheritdoc} * * @throws Exception */
    
<?php
use Symfony\Component\Console\Command\Command;

class FooSameCaseUppercaseCommand extends Command
{
    protected function configure(): void
    {
        $this->setName('foo:BAR')->setDescription('foo:BAR command');
    }
}
'type' => 'string',
        'weight' => -5,
      ])
      ->setDisplayOptions('form', [
        'type' => 'string_textfield',
        'weight' => -5,
      ])
      ->setDisplayConfigurable('form', TRUE);

    $fields['uid']
      ->setLabel(t('Authored by'))
      ->setDescription(t('The username of the content author.'))
      ->setRevisionable(TRUE)
      ->setDisplayOptions('view', [
        'label' => 'hidden',
        'type' => 'author',
        'weight' => 0,
      ])
      ->setDisplayOptions('form', [
        'type' => 'entity_reference_autocomplete',
        'weight' => 5,
        'settings' => [
          'match_operator' => 'CONTAINS',
          

  public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
    $properties['status'] = DataDefinition::create('integer')
      ->setLabel(new TranslatableMarkup('Comment status'))
      ->setRequired(TRUE);

    $properties['cid'] = DataDefinition::create('integer')
      ->setLabel(new TranslatableMarkup('Last comment ID'));

    $properties['last_comment_timestamp'] = DataDefinition::create('integer')
      ->setLabel(new TranslatableMarkup('Last comment timestamp'))
      ->setDescription(new TranslatableMarkup('The time that the last comment was created.'));

    $properties['last_comment_name'] = DataDefinition::create('string')
      ->setLabel(new TranslatableMarkup('Last comment name'))
      ->setDescription(new TranslatableMarkup('The name of the user posting the last comment.'));

    $properties['last_comment_uid'] = DataDefinition::create('integer')
      ->setLabel(new TranslatableMarkup('Last comment user ID'));

    $properties['comment_count'] = DataDefinition::create('integer')
      ->setLabel(new TranslatableMarkup('Number of comments'))
      ->setDescription(new TranslatableMarkup('The number of comments.'));

    
// Add a non-revisionable bundle field to test revision field table     // handling.     $this->addBundleField('string', FALSE, TRUE);

    // The 'changed' field type has a special behavior because it updates itself     // automatically if any of the other field values of an entity have been     // updated, so add it to the entity type that is being tested in order to     // provide test coverage for this special case.     $fields['changed'] = BaseFieldDefinition::create('changed')
      ->setLabel(t('Changed'))
      ->setDescription(t('The time that the content block was last edited.'))
      ->setTranslatable(TRUE)
      ->setRevisionable(TRUE);
    $this->state->set('entity_test_update.additional_base_field_definitions', $fields);

    $this->installEntitySchema($this->entityTypeId);

    // Enable an additional language.     ConfigurableLanguage::createFromLangcode('ro')->save();

    // Force the update function to convert one entity at a time.     $settings = Settings::getAll();
    
return [];
    }

    /** * {@inheritdoc} */
    protected function configure()
    {
        $this
            ->setName('sw:snippets:find:missing')
            ->setDescription('Find missing snippets in the database and dumps them into .ini files')
            ->addArgument(
                'locale',
                InputArgument::REQUIRED,
                'Locale to be exported.'
            )
            ->addOption(
                'target',
                null,
                InputOption::VALUE_REQUIRED,
                'The folder where the exported files should be placed. Defaults to snippetsExport',
                'snippetsExport'
            )
return [];
    }

    /** * {@inheritdoc} */
    protected function configure()
    {
        $this
            ->setName('sw:plugin:config:list')
            ->setDescription('Lists plugin configuration.')
            ->addOption(
                'shop',
                null,
                InputOption::VALUE_OPTIONAL,
                'Get configuration for shop id (deprecated)'
            )
            ->addOption(
                'shopId',
                null,
                InputOption::VALUE_OPTIONAL,
                'Get configuration for shop id'
            )

class ComposerScaffoldCommand extends BaseCommand {

  /** * {@inheritdoc} */
  protected function configure() {
    $this
      ->setName('drupal:scaffold')
      ->setAliases(['scaffold'])
      ->setDescription('Update the Drupal scaffold files.')
      ->setHelp(
        <<<EOT The <info>drupal:scaffold</info> command places the scaffold files in their respective locations according to the layout stipulated in the composer.json file. <info>php composer.phar drupal:scaffold</info> It is usually not necessary to call <info>drupal:scaffold</info> manually, because it is called automatically as needed, e.g. after an <info>install</info> or <info>update</info> command. Note, though, that only packages explicitly allowed to scaffold in the top-level composer.json will be processed by this command. For more information, see https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold.
/** * {@inheritdoc} */
  public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
    $properties = parent::propertyDefinitions($field_definition);

    $properties['summary'] = DataDefinition::create('string')
      ->setLabel(new TranslatableMarkup('Summary'));

    $properties['summary_processed'] = DataDefinition::create('string')
      ->setLabel(new TranslatableMarkup('Processed summary'))
      ->setDescription(new TranslatableMarkup('The summary text with the text format applied.'))
      ->setComputed(TRUE)
      ->setClass('\Drupal\text\TextProcessed')
      ->setSetting('text source', 'summary');

    return $properties;
  }

  /** * {@inheritdoc} */
  public static function schema(FieldStorageDefinitionInterface $field_definition) {
    

        return [
            [''],
            ['foo:'],
        ];
    }

    public function testGetSetDescription()
    {
        $command = new \TestCommand();
        $this->assertEquals('description', $command->getDescription(), '->getDescription() returns the description');
        $ret = $command->setDescription('description1');
        $this->assertEquals($command$ret, '->setDescription() implements a fluent interface');
        $this->assertEquals('description1', $command->getDescription(), '->setDescription() sets the description');
    }

    public function testGetSetHelp()
    {
        $command = new \TestCommand();
        $this->assertEquals('help', $command->getHelp(), '->getHelp() returns the help');
        $ret = $command->setHelp('help1');
        $this->assertEquals($command$ret, '->setHelp() implements a fluent interface');
        $this->assertEquals('help1', $command->getHelp(), '->setHelp() sets the help');
        


    /** * {@inheritdoc} */
    protected function configure()
    {
        parent::addConfigureShopwareVersion();

        $this
            ->setName('sw:store:list:updates')
            ->setDescription('Lists updates for installed plugins.')
        ;
    }

    /** * {@inheritdoc} */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        /** @var string $version */
        $version = $input->getOption('shopware-version');
        if (empty($version)) {
            
use Symfony\Component\Console\Output\OutputInterface;

class SitemapGenerateCommand extends ShopwareCommand
{
    /** * {@inheritdoc} */
    protected function configure()
    {
        $this
            ->setName('sw:generate:sitemap')
            ->setDescription('Generates sitemaps for a given shop (or all active ones)')
            ->addOption(
                'shopId',
                'i',
                InputOption::VALUE_OPTIONAL,
                'Generate sitemap only for for this shop'
            )
            ->addOption(
                'force',
                'f',
                InputOption::VALUE_NONE,
                'Force generation, even if generation has been locked by some other process'
            )
namespace Symfony\Component\Console\Tests\Fixtures;

use Symfony\Component\Console\Command\Command;

class DescriptorCommand3 extends Command
{
    protected function configure(): void
    {
        $this
            ->setName('descriptor:command3')
            ->setDescription('command 3 description')
            ->setHelp('command 3 help')
            ->setHidden()
        ;
    }
}
use Symfony\Component\Console\Output\OutputInterface;

class FooSubnamespaced1Command extends Command
{
    public InputInterface $input;
    public OutputInterface $output;

    protected function configure(): void
    {
        $this
            ->setName('foo:bar:baz')
            ->setDescription('The foo:bar:baz command')
            ->setAliases(['foobarbaz'])
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $this->input = $input;
        $this->output = $output;

        return 0;
    }
}
/** * {@inheritdoc} */
  public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
    // This entity type is used for generating database dumps from Drupal     // 8.0.0-rc1, which didn't have the entity key base fields defined in     // the parent class (ContentEntityBase), so we have to duplicate them here.
    $fields[$entity_type->getKey('id')] = BaseFieldDefinition::create('integer')
      ->setLabel(new TranslatableMarkup('ID'))
      ->setDescription(new TranslatableMarkup('The ID of the test entity.'))
      ->setReadOnly(TRUE)
      ->setSetting('unsigned', TRUE);

    $fields[$entity_type->getKey('uuid')] = BaseFieldDefinition::create('uuid')
      ->setLabel(new TranslatableMarkup('UUID'))
      ->setDescription(new TranslatableMarkup('The UUID of the test entity.'))
      ->setReadOnly(TRUE);

    $fields[$entity_type->getKey('bundle')] = BaseFieldDefinition::create('string')
      ->setLabel(new TranslatableMarkup('Type'))
      ->setDescription(new TranslatableMarkup('The bundle of the test entity.'))
      
Home | Imprint | This part of the site doesn't use cookies.