public static function findPublishedByPid($pid)
    {
        $t = static::getTableAlias();
        $columns = ["$t.pid=?"];
        $values = [$pid];

        if (!BE_USER_LOGGED_IN) {
            $columns[] = "$t.published=?";
            $values[] = 1;
        }

        return static::findBy($columns, $values, ['order' => "$t.sorting"]);
    }
public static function findPublishedByPid($pid)
    {
        $t = static::getTableAlias();
        $columns = ["$t.pid=?"];
        $values = [$pid];

        if (!BE_USER_LOGGED_IN) {
            $columns[] = "$t.published=?";
            $values[] = 1;
        }

        return static::findBy($columns, $values, ['order' => "$t.sorting"]);
    }
public static function findPublishedByPid ( $ pid ) { $ t = static :: getTableAlias ( ) ; $ columns = [ "$t.pid=?" ] ; $ values = [ $ pid ] ; if ( ! BE_USER_LOGGED_IN ) { $ columns [ ] = "$t.published=?" ; $ values [ ] = 1 ; } return static :: findBy ( $ columns , $ values , [ 'order' => "$t.sorting" ] ) ; }
Find published news categories by parent ID.

@param int $pid

@return Collection|null
Find published news categories by parent ID .