예제 #1
0
 /**
  * Add options to FlexForm Selection - Options can be defined in TSConfig
  *
  * @param array $params
  * @return void
  */
 public function addOptions(&$params)
 {
     $this->initialize();
     $tSconfig = BackendUtility::getPagesTSconfig($this->getPid());
     $this->addCaptchaOption($params);
     $tab = $params['config']['itemsProcFuncTab'] . '.';
     if (!empty($tSconfig['tx_femanager.']['flexForm.'][$tab]['addFieldOptions.'])) {
         $options = $tSconfig['tx_femanager.']['flexForm.'][$tab]['addFieldOptions.'];
         foreach ((array) $options as $value => $label) {
             $params['items'][] = [StringUtility::startsWith($label, 'LLL:') ? $this->languageService->sL($label) : $label, $value];
         }
     }
 }
예제 #2
0
 /**
  * Should this key skipped because it starts with _ or ends with .
  *
  * @param string $key
  * @return bool
  */
 protected function isSkippedKey($key)
 {
     return StringUtility::startsWith($key, '_') || StringUtility::endsWith($key, '.');
 }
예제 #3
0
 /**
  * startsWith Test
  *
  * @param string $haystack
  * @param string $needle
  * @param bool $expectedResult
  * @dataProvider startsWithReturnsStringDataProvider
  * @return void
  * @test
  */
 public function startsWithReturnsString($haystack, $needle, $expectedResult)
 {
     $this->assertSame($expectedResult, StringUtility::startsWith($haystack, $needle));
 }