public function getPidFromUid($uid = 0)
    {
        $queryBuilder = self::getQueryBuilder();
        $triggerElement = $queryBuilder
            ->select('pid')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->eq(
                    'uid',
                    $queryBuilder->createNamedParameter(abs($uid), \PDO::PARAM_INT)
                )
            )
            ->execute()
            ->fetch();
        $pid = (int)$triggerElement['pid'];
        return is_array($triggerElement) && $pid ? $pid : 0;
    }
public function getPidFromUid($uid = 0)
    {
        $queryBuilder = self::getQueryBuilder();
        $triggerElement = $queryBuilder
            ->select('pid')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->eq(
                    'uid',
                    $queryBuilder->createNamedParameter(abs($uid), \PDO::PARAM_INT)
                )
            )
            ->execute()
            ->fetch();
        $pid = (int)$triggerElement['pid'];
        return is_array($triggerElement) && $pid ? $pid : 0;
    }
public function getPidFromUid ( $ uid = 0 ) { $ queryBuilder = self :: getQueryBuilder ( ) ; $ triggerElement = $ queryBuilder -> select ( 'pid' ) -> from ( 'tt_content' ) -> where ( $ queryBuilder -> expr ( ) -> eq ( 'uid' , $ queryBuilder -> createNamedParameter ( abs ( $ uid ) , \ PDO :: PARAM_INT ) ) ) -> execute ( ) -> fetch ( ) ; $ pid = ( int ) $ triggerElement [ 'pid' ] ; return is_array ( $ triggerElement ) && $ pid ? $ pid : 0 ; }
converts tt_content uid into a pid

@param int $uid the uid value of a tt_content record

@return int
converts tt_content uid into a pid