CheckoutPage::find_link PHP Method

    public static function find_link($urlSegment = false, $action = null, $id = null)
    {
        $base = CheckoutPage_Controller::config()->url_segment;
        if ($page = self::get()->first()) {
            $base = $page->Link();
        }
        return Controller::join_links($base, $action, $id);
    }

Usage Example

 public function testFindLink()
 {
     $this->checkoutpage = $this->objFromFixture('CheckoutPage', 'checkout');
     $this->checkoutpage->publish('Stage', 'Live');
     $link = CheckoutPage::find_link();
     $this->assertEquals(Director::baseURL() . 'checkout/', $link, 'find_link() returns the correct link to checkout.');
 }
All Usage Examples Of CheckoutPage::find_link