gorriecoe\Robots\Robots
Robots Provides robots.txt functionality
Synopsis
class Robots
extends Controller
{
- // members
- private static string|array $sitemap = '/sitemap.xml';
- private static array $disallowed_urls = ;
- private static array $allowed_urls = ;
- private static boolean $disallow_unsearchable = true;
- private static array $casting = ;
- // methods
- protected boolean isLive()
- public HTTPResponse index()
- public string getSitemap()
- protected array disallowedUrls()
- public string getDisallow()
- protected array allowedUrls()
- public string getAllow()
Hierarchy
Extends
- SilverStripe\Control\Controller
Members
private
- $allowed_urls — array
- $casting
—
array
Belongs_to relationship - $disallow_unsearchable — boolean
- $disallowed_urls — array
- $sitemap — gorriecoe\Robots\string|array
Methods
protected
- allowedUrls() — Returns an array of allowed URLs
- disallowedUrls() — Returns an array of disallowed URLs
- isLive() — Determines if this is a public site
public
- getAllow() — Renders the list of allowed pages, if any
- getDisallow() — Renders the list of disallowed pages
- getSitemap() — Renders the sitemap link reference
- index() — Generates the response containing the robots.txt content