public static function registerDelegates($name)
    {
        $obj = self::getInstance($name);
        $id = self::fetchExtensionID($name);

        if (!$id) {
            return false;
        }

        Symphony::Database()->delete('tbl_extensions_delegates', sprintf("
            `extension_id` = %d ", $id
        ));

        $delegates = $obj->getSubscribedDelegates();

        if (is_array($delegates) && !empty($delegates)) {
            foreach ($delegates as $delegate) {
                Symphony::Database()->insert(
                    array(
                        'extension_id' => $id,
                        'page' => $delegate['page'],
                        'delegate' => $delegate['delegate'],
                        'callback' => $delegate['callback']
                    ),
                    'tbl_extensions_delegates'
                );
            }
        }

        // Remove the unused DB records
        self::cleanupDatabase();

        return $id;
    }
public static function registerDelegates($name)
    {
        $obj = self::getInstance($name);
        $id = self::fetchExtensionID($name);

        if (!$id) {
            return false;
        }

        Symphony::Database()->delete('tbl_extensions_delegates', sprintf("
            `extension_id` = %d ", $id
        ));

        $delegates = $obj->getSubscribedDelegates();

        if (is_array($delegates) && !empty($delegates)) {
            foreach ($delegates as $delegate) {
                Symphony::Database()->insert(
                    array(
                        'extension_id' => $id,
                        'page' => $delegate['page'],
                        'delegate' => $delegate['delegate'],
                        'callback' => $delegate['callback']
                    ),
                    'tbl_extensions_delegates'
                );
            }
        }

        // Remove the unused DB records
        self::cleanupDatabase();

        return $id;
    }
public static function registerDelegates ( $ name ) { $ obj = self :: getInstance ( $ name ) ; $ id = self :: fetchExtensionID ( $ name ) ; if ( ! $ id ) { return false ; } Symphony :: Database ( ) -> delete ( 'tbl_extensions_delegates' , sprintf ( "
            `extension_id` = %d " , $ id ) ) ; $ delegates = $ obj -> getSubscribedDelegates ( ) ; if ( is_array ( $ delegates ) && ! empty ( $ delegates ) ) { foreach ( $ delegates as $ delegate ) { Symphony :: Database ( ) -> insert ( array ( 'extension_id' => $ id , 'page' => $ delegate [ 'page' ] , 'delegate' => $ delegate [ 'delegate' ] , 'callback' => $ delegate [ 'callback' ] ) , 'tbl_extensions_delegates' ) ; } } // Remove the unused DB records self :: cleanupDatabase ( ) ; return $ id ; }
This functions registers an extensions delegates in `tbl_extensions_delegates`.

@param string $name
The name of the Extension Class minus the extension prefix.
@throws Exception
@throws SymphonyErrorPage
@return integer
The Extension ID
This functions registers an extensions delegates in tbl_extensions_delegates .