/**
  * Inits the finisher mapping settings values to internal attributes.
  *
  * @param array $gp
  * @param array $settings
  */
 public function init($gp, $settings)
 {
     parent::init($gp, $settings);
     $this->utils = AuthCodeUtils::getInstance();
     /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */
     $objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->authCodeRepository = $objectManager->get('Tx\\Authcode\\Domain\\Repository\\AuthCodeRepository');
 }
 /**
  * Inits the finisher mapping settings values to internal attributes.
  *
  * @param array $gp
  * @param array $settings
  * @return void
  */
 public function init($gp, $settings)
 {
     parent::init($gp, $settings);
     $this->utils = AuthCodeUtils::getInstance();
 }
 /**
  * Inits the finisher mapping settings values to internal attributes.
  *
  * @param array $gp
  * @param array $settings
  * @throws MissingSettingException If not all requires settings have heen set
  * @return void
  */
 public function init($gp, $settings)
 {
     parent::init($gp, $settings);
     if (!isset($this->utils)) {
         $this->utils = AuthCodeUtils::getInstance();
     }
     if (!isset($this->objectManager)) {
         $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     }
     if (!isset($this->authCodeRepository)) {
         $this->authCodeRepository = $this->objectManager->get('Tx\\Authcode\\Domain\\Repository\\AuthCodeRepository');
     }
     if ($this->settings['independentMode']) {
         $this->independentMode = $this->utilityFuncs->getSingle($this->settings, 'independentMode');
     }
     if (!$this->independentMode) {
         if (!$this->settings['table']) {
             throw new MissingSettingException('table');
         } else {
             $this->table = (string) $this->utilityFuncs->getSingle($this->settings, 'table');
         }
         if ($this->settings['uidField']) {
             $this->uidField = $this->settings['uidField'];
         }
     }
     if (!empty($this->settings['action'])) {
         if ($this->settings['action'] === 'accessForm') {
             $this->utilityFuncs->debugMessage('Using the accessForm action for the GenerateAuthCodeDB finisher is deprecated! Use accessPage instead.', array(), 2);
             GeneralUtility::deprecationLog('formhandler_subscription: Using the accessForm action for the GenerateAuthCodeDB finisher is deprecated. Use accessPage instead.');
             $this->settings['action'] = AuthCodeAction::ACCESS_PAGE;
         }
         $this->action = $this->settings['action'];
     } else {
         $this->action = AuthCodeAction::RECORD_ENABLE;
     }
     $this->utils->checkAuthCodeAction($this->action);
     if ($this->settings['hiddenField']) {
         $this->hiddenField = $this->settings['hiddenField'];
     } elseif ($GLOBALS['TCA'][$this->table]['ctrl']['enablecolumns']['disabled']) {
         $this->hiddenField = $GLOBALS['TCA'][$this->table]['ctrl']['enablecolumns']['disabled'];
     } else {
         $this->hiddenField = 'hidden';
     }
 }
 /**
  * Inits the finisher mapping settings values to internal attributes.
  *
  * @param array $gp
  * @param array $settings
  * @return void
  */
 public function init($gp, $settings)
 {
     parent::init($gp, $settings);
     $this->typo3Db = $GLOBALS['TYPO3_DB'];
     $this->utils = AuthCodeUtils::getInstance();
 }