src/Charcoal/Admin/Widget/TableWidget.php
public function objectCreateUrl()
    {
        $actions = $this->listActions();
        if ($actions) {
            foreach ($actions as $action) {
                if (isset($action['ident']) && $action['ident'] === 'create') {
                    if (isset($action['url'])) {
                        $model = $this->proto();
                        if ($model->view()) {
                            $action['url'] = $model->render((string)$action['url']);
                        } else {
                            $action['url'] = preg_replace('~{{\s*id\s*}}~', $this->currentObjId, $action['url']);
                        }

                        return $action['url'];
                    }
                }
            }
        }

        return $this->objectEditUrl();
    }
public function objectCreateUrl()
    {
        $actions = $this->listActions();
        if ($actions) {
            foreach ($actions as $action) {
                if (isset($action['ident']) && $action['ident'] === 'create') {
                    if (isset($action['url'])) {
                        $model = $this->proto();
                        if ($model->view()) {
                            $action['url'] = $model->render((string)$action['url']);
                        } else {
                            $action['url'] = preg_replace('~{{\s*id\s*}}~', $this->currentObjId, $action['url']);
                        }

                        return $action['url'];
                    }
                }
            }
        }

        return $this->objectEditUrl();
    }
public function objectCreateUrl ( ) { $ actions = $ this -> listActions ( ) ; if ( $ actions ) { foreach ( $ actions as $ action ) { if ( isset ( $ action [ 'ident' ] ) && $ action [ 'ident' ] === 'create' ) { if ( isset ( $ action [ 'url' ] ) ) { $ model = $ this -> proto ( ) ; if ( $ model -> view ( ) ) { $ action [ 'url' ] = $ model -> render ( ( string ) $ action [ 'url' ] ) ; } else { $ action [ 'url' ] = preg_replace ( '~{{\s*id\s*}}~' , $ this -> currentObjId , $ action [ 'url' ] ) ; } return $ action [ 'url' ] ; } } } } return $ this -> objectEditUrl ( ) ; }
Generate URL for creating an object
@return string
Generate URL for creating an object