protected function checkPageTypeOrEmpty(
        $fieldName,
        $canUseFlexforms,
        $sheet,
        $explanation,
        $typeCondition
    ) {
        $this->checkIfPidListOrEmpty(
            $fieldName,
            $canUseFlexforms,
            $sheet,
            $explanation
        );

        if ($this->objectToCheck->hasConfValueString($fieldName, $sheet)) {
            $pids = $this->objectToCheck->getConfValueString($fieldName, $sheet);

            $offendingPids = \Tx_Oelib_Db::selectColumnForMultiple(
                'uid',
                'pages',
                'uid IN (' . $pids . ') AND NOT (doktype' . $typeCondition . ')' .
                \Tx_Oelib_Db::enableFields('pages')
            );
            $dbResultCount = count($offendingPids);

            if ($dbResultCount > 0) {
                $pageIdPlural = ($dbResultCount > 1) ? 's' : '';
                $bePlural = ($dbResultCount > 1) ? 'are' : 'is';

                $message = 'The TS setup variable <strong>' .
                    $this->getTSSetupPath() . $fieldName .
                    '</strong> contains the page ID' . $pageIdPlural .
                    ' <strong>' . implode(',', $offendingPids) . '</strong> ' .
                    'which ' . $bePlural . ' of an incorrect page type. ' .
                    $explanation . '<br />';
                $this->setErrorMessageAndRequestCorrection(
                    $fieldName,
                    $canUseFlexforms,
                    $message
                );
            }
        }
    }
protected function checkPageTypeOrEmpty(
        $fieldName,
        $canUseFlexforms,
        $sheet,
        $explanation,
        $typeCondition
    ) {
        $this->checkIfPidListOrEmpty(
            $fieldName,
            $canUseFlexforms,
            $sheet,
            $explanation
        );

        if ($this->objectToCheck->hasConfValueString($fieldName, $sheet)) {
            $pids = $this->objectToCheck->getConfValueString($fieldName, $sheet);

            $offendingPids = \Tx_Oelib_Db::selectColumnForMultiple(
                'uid',
                'pages',
                'uid IN (' . $pids . ') AND NOT (doktype' . $typeCondition . ')' .
                \Tx_Oelib_Db::enableFields('pages')
            );
            $dbResultCount = count($offendingPids);

            if ($dbResultCount > 0) {
                $pageIdPlural = ($dbResultCount > 1) ? 's' : '';
                $bePlural = ($dbResultCount > 1) ? 'are' : 'is';

                $message = 'The TS setup variable <strong>' .
                    $this->getTSSetupPath() . $fieldName .
                    '</strong> contains the page ID' . $pageIdPlural .
                    ' <strong>' . implode(',', $offendingPids) . '</strong> ' .
                    'which ' . $bePlural . ' of an incorrect page type. ' .
                    $explanation . '<br />';
                $this->setErrorMessageAndRequestCorrection(
                    $fieldName,
                    $canUseFlexforms,
                    $message
                );
            }
        }
    }
protected function checkPageTypeOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ typeCondition ) { $ this -> checkIfPidListOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; if ( $ this -> objectToCheck -> hasConfValueString ( $ fieldName , $ sheet ) ) { $ pids = $ this -> objectToCheck -> getConfValueString ( $ fieldName , $ sheet ) ; $ offendingPids = \ Tx_Oelib_Db :: selectColumnForMultiple ( 'uid' , 'pages' , 'uid IN (' . $ pids . ') AND NOT (doktype' . $ typeCondition . ')' . \ Tx_Oelib_Db :: enableFields ( 'pages' ) ) ; $ dbResultCount = count ( $ offendingPids ) ; if ( $ dbResultCount > 0 ) { $ pageIdPlural = ( $ dbResultCount > 1 ) ? 's' : '' ; $ bePlural = ( $ dbResultCount > 1 ) ? 'are' : 'is' ; $ message = 'The TS setup variable <strong>' . $ this -> getTSSetupPath ( ) . $ fieldName . '</strong> contains the page ID' . $ pageIdPlural . ' <strong>' . implode ( ',' , $ offendingPids ) . '</strong> ' . 'which ' . $ bePlural . ' of an incorrect page type. ' . $ explanation . '<br />' ; $ this -> setErrorMessageAndRequestCorrection ( $ fieldName , $ canUseFlexforms , $ message ) ; } } }
Checks whether a configuration value either is empty or contains a
comma-separated list of PIDs that specify pages or a given type.

@param string $fieldName
TS setup field name to extract, must not be empty
@param bool $canUseFlexforms
whether the value can also be set via flexforms (this will be
mentioned in the error message)
@param string $sheet
flexforms sheet pointer, eg. "sDEF", will be ignored if
$canUseFlexforms is set to FALSE
@param string $explanation
a sentence explaining what that configuration value is needed for,
must not be empty
@param string $typeCondition
a comparison operator with a value that will be used in a SQL
query to check for the correct page types, for example "<199" or
"=254", must not be empty

@return void
Checks whether a configuration value either is empty or contains a comma - separated list of PIDs that specify pages or a given type .