concrete/src/Block/BlockController.php
public function getActionURL($task)
    {
        try {

            if (is_object($this->block)) {
                if (is_object($this->block->getProxyBlock())) {
                    $b = $this->block->getProxyBlock();
                } else {
                    $b = $this->block;
                }

                $action = $this->getAction();
                if ($action === 'view' || strpos($action, 'action_') === 0) {
                    $c = Page::getCurrentPage();
                    if (is_object($b) && is_object($c)) {
                        $arguments = func_get_args();
                        $arguments[] = $b->getBlockID();
                        array_unshift($arguments, $c);

                        return call_user_func_array(array('\URL', 'page'), $arguments);
                    }
                } else {
                    $c = $this->getCollectionObject();
                    $arguments = array_merge(array('/ccm/system/block/action/edit',
                        $c->getCollectionID(),
                        urlencode($this->getAreaObject()->getAreaHandle()),
                        $this->block->getBlockID(),
                    ), func_get_args());

                    return call_user_func_array(array('\URL', 'to'), $arguments);

                }
            } else {
                $c = \Page::getCurrentPage();
                $arguments = array_merge(array('/ccm/system/block/action/add',
                    $c->getCollectionID(),
                    urlencode($this->getAreaObject()->getAreaHandle()),
                    $this->getBlockTypeID(),
                ), func_get_args());

                return call_user_func_array(array('\URL', 'to'), $arguments);

            }
        } catch (\Exception $e) {
        }

    }
public function getActionURL($task)
    {
        try {

            if (is_object($this->block)) {
                if (is_object($this->block->getProxyBlock())) {
                    $b = $this->block->getProxyBlock();
                } else {
                    $b = $this->block;
                }

                $action = $this->getAction();
                if ($action === 'view' || strpos($action, 'action_') === 0) {
                    $c = Page::getCurrentPage();
                    if (is_object($b) && is_object($c)) {
                        $arguments = func_get_args();
                        $arguments[] = $b->getBlockID();
                        array_unshift($arguments, $c);

                        return call_user_func_array(array('\URL', 'page'), $arguments);
                    }
                } else {
                    $c = $this->getCollectionObject();
                    $arguments = array_merge(array('/ccm/system/block/action/edit',
                        $c->getCollectionID(),
                        urlencode($this->getAreaObject()->getAreaHandle()),
                        $this->block->getBlockID(),
                    ), func_get_args());

                    return call_user_func_array(array('\URL', 'to'), $arguments);

                }
            } else {
                $c = \Page::getCurrentPage();
                $arguments = array_merge(array('/ccm/system/block/action/add',
                    $c->getCollectionID(),
                    urlencode($this->getAreaObject()->getAreaHandle()),
                    $this->getBlockTypeID(),
                ), func_get_args());

                return call_user_func_array(array('\URL', 'to'), $arguments);

            }
        } catch (\Exception $e) {
        }

    }
public function getActionURL ( $ task ) { try { if ( is_object ( $ this -> block ) ) { if ( is_object ( $ this -> block -> getProxyBlock ( ) ) ) { $ b = $ this -> block -> getProxyBlock ( ) ; } else { $ b = $ this -> block ; } $ action = $ this -> getAction ( ) ; if ( $ action === 'view' || strpos ( $ action , 'action_' ) === 0 ) { $ c = Page :: getCurrentPage ( ) ; if ( is_object ( $ b ) && is_object ( $ c ) ) { $ arguments = func_get_args ( ) ; $ arguments [ ] = $ b -> getBlockID ( ) ; array_unshift ( $ arguments , $ c ) ; return call_user_func_array ( array ( '\URL' , 'page' ) , $ arguments ) ; } } else { $ c = $ this -> getCollectionObject ( ) ; $ arguments = array_merge ( array ( '/ccm/system/block/action/edit' , $ c -> getCollectionID ( ) , urlencode ( $ this -> getAreaObject ( ) -> getAreaHandle ( ) ) , $ this -> block -> getBlockID ( ) , ) , func_get_args ( ) ) ; return call_user_func_array ( array ( '\URL' , 'to' ) , $ arguments ) ; } } else { $ c = \ Page :: getCurrentPage ( ) ; $ arguments = array_merge ( array ( '/ccm/system/block/action/add' , $ c -> getCollectionID ( ) , urlencode ( $ this -> getAreaObject ( ) -> getAreaHandle ( ) ) , $ this -> getBlockTypeID ( ) , ) , func_get_args ( ) ) ; return call_user_func_array ( array ( '\URL' , 'to' ) , $ arguments ) ; } } catch ( \ Exception $ e ) { } }
Creates a URL that can be posted or navigated to that, when done so, will automatically run the corresponding method inside the block's controller.
It can also be used to perform system operations, accordingly to the current action.

@param mixed $task,... The arguments to build the URL (variable number of arguments).

@return \Concrete\Core\Url\UrlImmutable|null Return NULL in case of problems
Creates a URL that can be posted or navigated to that when done so will automatically run the corresponding method inside the block s controller . It can also be used to perform system operations accordingly to the current action .