SproutCMS

This is the code documentation for the SproutCMS project

class Lnk

This is a system of portable, extensible link management.

The system is based around the "link specification", which is a string.
Link specifications should be stored in a TEXT field.

These specs relate to classes which extend LinkSpec.
The class name needs to start with "LinkSpec" too.

Source code (22 results)

/skin/default/partials/_hero-banner.php   Highlighted file source

Line 4: use Sprout\Helpers\Lnk;
Line 25: <p><a class="button button-large" href="<?= Enc::html(Lnk::url($banners[0]['link'])); ?>"><?= Enc::html($banners[0]['link_label']); ?></a></p>

/skin/default/partials/_hero-banner.php   Highlighted file source

Line 4: use Sprout\Helpers\Lnk;
Line 25: <p><a class="button button-large" href="<?= Enc::html(Lnk::url($banners[0]['link'])); ?>"><?= Enc::html($banners[0]['link_label']); ?></a></p>

/skin/default/partials/_promos-three.php   Highlighted file source

Line 4: use Sprout\Helpers\Lnk;
Line 43: <a href="<?= Enc::html(Lnk::url($promo['link'])); ?>" class="button promo__button"><?= Enc::html($promo['link_label']); ?></a>

/skin/default/partials/_promos-three.php   Highlighted file source

Line 4: use Sprout\Helpers\Lnk;
Line 43: <a href="<?= Enc::html(Lnk::url($promo['link'])); ?>" class="button promo__button"><?= Enc::html($promo['link_label']); ?></a>

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 47: use Sprout\Helpers\Lnk;
Line 1110: $typename = Lnk::typename($data['redirect']);
Line 1484: if (!Lnk::valid($_POST['redirect'])) {

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 47: use Sprout\Helpers\Lnk;
Line 1110: $typename = Lnk::typename($data['redirect']);
Line 1484: if (!Lnk::valid($_POST['redirect'])) {

/sprout/Controllers/Admin/RedirectAdminController.php   Highlighted file source

Line 16: use Sprout\Helpers\ColModifierLnk;
Line 58: 'Destination' => [new ColModifierLnk(), 'destination'],

/sprout/Controllers/Admin/RedirectAdminController.php   Highlighted file source

Line 16: use Sprout\Helpers\ColModifierLnk;
Line 58: 'Destination' => [new ColModifierLnk(), 'destination'],

/sprout/Controllers/PageController.php   Highlighted file source

Line 27: use Sprout\Helpers\Lnk;
Line 141: Url::redirect(Lnk::url($page['redirect']));

/sprout/Controllers/PageController.php   Highlighted file source

Line 27: use Sprout\Helpers\Lnk;
Line 141: Url::redirect(Lnk::url($page['redirect']));

/sprout/Helpers/ColModifierLnk.php   Highlighted file source

Line 17: * Formats a Lnk field into something appealing
Line 19: class ColModifierLnk extends ColModifier
Line 38: return 'Link to ' . Lnk::typename($val);

/sprout/Helpers/Fb.php   Highlighted file source

Line 587: public static function lnk($name, array $attrs = [], array $options = [])
Line 592: return Lnk::editform($name, $value, !empty($options['required']));

/sprout/Helpers/Fb.php   Highlighted file source

Line 587: public static function lnk($name, array $attrs = [], array $options = [])
Line 592: return Lnk::editform($name, $value, !empty($options['required']));

/sprout/Helpers/LinkSpec.php   Highlighted file source

Line 18: * Base class for the backend of the extensible link system: {@see Lnk}

/sprout/Helpers/LinkSpec.php   Highlighted file source

Line 18: * Base class for the backend of the extensible link system: {@see Lnk}

/sprout/Helpers/Lnk.php   Highlighted file source

Line 29: class Lnk
Line 59: $view = new View('sprout/components/lnk_editform');
Line 117: * This differs in behaviour to `Lnk::url` as it will return null if the spec is

/sprout/Helpers/Pagenode.php   Highlighted file source

Line 42: return Lnk::url($this->data['redirect']);

/sprout/Helpers/PageRouting.php   Highlighted file source

Line 59: $url = Lnk::url($row['destination']);

/sprout/Helpers/SproutVariable.php   Highlighted file source

Line 45: public $lnk;
Line 65: $this->lnk = new Lnk();

/sprout/tests/lnkTest.php   Highlighted file source

Line 14: use Sprout\Helpers\Lnk;
Line 18: class lnkTest extends PHPUnit_Framework_TestCase
Line 30: $this->assertTrue(Lnk::url($spec) === 'http://www.chaoticrage.com');
Line 31: $this->assertTrue(Lnk::atag($spec) === '<a href="http://www.chaoticrage.com" target="_blank">');
Line 85: $this->assertEquals($expected, Lnk::atag($spec, $attrs));

/sprout/tests/lnkTest.php   Highlighted file source

Line 14: use Sprout\Helpers\Lnk;
Line 18: class lnkTest extends PHPUnit_Framework_TestCase
Line 30: $this->assertTrue(Lnk::url($spec) === 'http://www.chaoticrage.com');
Line 31: $this->assertTrue(Lnk::atag($spec) === '<a href="http://www.chaoticrage.com" target="_blank">');
Line 85: $this->assertEquals($expected, Lnk::atag($spec, $attrs));

A total of 49 lines in 22 files were found