[ 'prefix' => 'rtl', 'longPrefix' => 'rtlLocale', 'cast' => 'string', 'flag' => false, 'required' => true, 'description' => 'add locales code to enable rtl handling', ], ]; } protected function provideDescription() { return 'This command allow to add rtl handling for locales'; } /** * @inheritDoc */ protected function run() { $report = Report::createInfo(sprintf('Registering new right to left locale: %s', $this->getOption(self::RTL_LOCALE))); $this->getRegistry()->addRtlLocale( $this->getOption(self::RTL_LOCALE) ); $report->add( Report::createSuccess( sprintf( 'Registering new right to left locale "%s" was successful', $this->getOption(self::RTL_LOCALE) ) ) ); return $report; } private function getRegistry(): RightToLeftTextDirectionRegistry { return $this->getServiceManager()->get(RightToLeftTextDirectionRegistry::class); } }