concrete/src/Block/Block.php
public function isAlias($c = null)
    {
        if ($c) {
            $db = Loader::db();
            $cID = $c->getCollectionID();
            $vo = $c->getVersionObject();
            $cvID = $vo->getVersionID();
            $q = 'select bID from CollectionVersionBlocks where bID = ? and cID=? and isOriginal = 0 and cvID = ?';
            $r = $db->query($q, [$this->getBlockID(), $cID, $cvID]);
            if ($r) {
                return $r->numRows() > 0;
            }
        } else {
            return isset($this->isOriginal) ? (!$this->isOriginal) : false;
        }
    }
public function isAlias($c = null)
    {
        if ($c) {
            $db = Loader::db();
            $cID = $c->getCollectionID();
            $vo = $c->getVersionObject();
            $cvID = $vo->getVersionID();
            $q = 'select bID from CollectionVersionBlocks where bID = ? and cID=? and isOriginal = 0 and cvID = ?';
            $r = $db->query($q, [$this->getBlockID(), $cID, $cvID]);
            if ($r) {
                return $r->numRows() > 0;
            }
        } else {
            return isset($this->isOriginal) ? (!$this->isOriginal) : false;
        }
    }
public function isAlias ( $ c = null ) { if ( $ c ) { $ db = Loader :: db ( ) ; $ cID = $ c -> getCollectionID ( ) ; $ vo = $ c -> getVersionObject ( ) ; $ cvID = $ vo -> getVersionID ( ) ; $ q = 'select bID from CollectionVersionBlocks where bID = ? and cID=? and isOriginal = 0 and cvID = ?' ; $ r = $ db -> query ( $ q , [ $ this -> getBlockID ( ) , $ cID , $ cvID ] ) ; if ( $ r ) { return $ r -> numRows ( ) > 0 ; } } else { return isset ( $ this -> isOriginal ) ? ( ! $ this -> isOriginal ) : false ; } }
Check if this block instance is an alias.

@param \Concrete\Core\Page\Collection\Collection|null $c if specified, check if the block with the ID of this instance is an alias in that page (otherwise the check is done agains this specific block instance)

@return bool|null return NULL if $c is specified but there's no block with the same ID in that page
Check if this block instance is an alias .