Skip to content

Instantly share code, notes, and snippets.

@RobinRadic
Created January 24, 2020 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobinRadic/3b96e608a7c85a83d88bf2e8d94c24da to your computer and use it in GitHub Desktop.
Save RobinRadic/3b96e608a7c85a83d88bf2e8d94c24da to your computer and use it in GitHub Desktop.
<?php namespace Anomaly\NavigationModule\Link\Type\Contract;
use Anomaly\NavigationModule\Link\Contract\LinkInterface;
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
/**
* Interface LinkTypeInterface
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thompson <ryan@pyrocms.com>
*/
interface LinkTypeInterface
{
/**
* Return the link URL.
*
* @param LinkInterface $link
* @return string
*/
public function url(LinkInterface $link);
/**
* Return the link title.
*
* @param LinkInterface $link
* @return string
*/
public function title(LinkInterface $link);
/**
* Return if the link exists or not.
*
* @param LinkInterface $link
* @return bool
*/
public function exists(LinkInterface $link);
/**
* Return if the link is enabled or not.
*
* @param LinkInterface $link
* @return bool
*/
public function enabled(LinkInterface $link);
/**
* Return the form builder for
* the link type entry.
*
* @return FormBuilder
*/
public function builder();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment