public static function getSiteIdFromMetadata(DataTable $table)
    {
        $site = $table->getMetadata('site');
        if (empty($site)) {
            return null;
        } else {
            return $site->getId();
        }
    }
public static function getSiteIdFromMetadata(DataTable $table)
    {
        $site = $table->getMetadata('site');
        if (empty($site)) {
            return null;
        } else {
            return $site->getId();
        }
    }
public static function getSiteIdFromMetadata ( DataTable $ table ) { $ site = $ table -> getMetadata ( 'site' ) ; if ( empty ( $ site ) ) { return null ; } else { return $ site -> getId ( ) ; } }
Returns the ID of the site a table is related to based on the 'site' metadata entry,
or null if there is none.

@param DataTable $table
@return int|null
Returns the ID of the site a table is related to based on the site metadata entry or null if there is none .