public static function getAttachedPages($type, $r_handle)
    {
        $col = self::getColumnFromType($type);

        $pages = PageManager::fetch(false, array('id'), array(sprintf(
            '`%s` = "%s" OR `%s` REGEXP "%s"',
            $col,
            $r_handle,
            $col,
            '^' . $r_handle . ',|,' . $r_handle . ',|,' . $r_handle . '$'
        )));

        if (is_array($pages)) {
            foreach ($pages as $key => &$page) {
                $pages[$key] = array(
                    'id' => $page['id'],
                    'title' => PageManager::resolvePageTitle($page['id'])
                );
            }
        }

        return (is_null($pages) ? array() : $pages);
    }
public static function getAttachedPages($type, $r_handle)
    {
        $col = self::getColumnFromType($type);

        $pages = PageManager::fetch(false, array('id'), array(sprintf(
            '`%s` = "%s" OR `%s` REGEXP "%s"',
            $col,
            $r_handle,
            $col,
            '^' . $r_handle . ',|,' . $r_handle . ',|,' . $r_handle . '$'
        )));

        if (is_array($pages)) {
            foreach ($pages as $key => &$page) {
                $pages[$key] = array(
                    'id' => $page['id'],
                    'title' => PageManager::resolvePageTitle($page['id'])
                );
            }
        }

        return (is_null($pages) ? array() : $pages);
    }
public static function getAttachedPages ( $ type , $ r_handle ) { $ col = self :: getColumnFromType ( $ type ) ; $ pages = PageManager :: fetch ( false , array ( 'id' ) , array ( sprintf ( '`%s` = "%s" OR `%s` REGEXP "%s"' , $ col , $ r_handle , $ col , '^' . $ r_handle . ',|,' . $ r_handle . ',|,' . $ r_handle . '$' ) ) ) ; if ( is_array ( $ pages ) ) { foreach ( $ pages as $ key => & $ page ) { $ pages [ $ key ] = array ( 'id' => $ page [ 'id' ] , 'title' => PageManager :: resolvePageTitle ( $ page [ 'id' ] ) ) ; } } return ( is_null ( $ pages ) ? array ( ) : $ pages ) ; }
Given the resource handle, this function will return an associative
array of Page information, filtered by the pages the resource is attached to.

@param integer $type
The resource type, either `RESOURCE_TYPE_EVENT` or `RESOURCE_TYPE_DS`
@param string $r_handle
The handle of the resource.
@return array
An associative array of Page information, according to the pages the resource is attached to.
Given the resource handle this function will return an associative array of Page information filtered by the pages the resource is attached to .