gorriecoe\ShortURL\Models\ShortURL
ShortURL
Synopsis
class ShortURL
extends Link
implements
ScaffoldingProvider
{
- // members
- private static string $table_name = 'ShortURL';
- private static string $singular_name = 'Short URL';
- private static string $plural_name = 'Short URLS';
- private static array $db = ;
- private static array $default_sort = ;
- private static integer $url_length = 5;
- private static array $internal_types = ;
- // methods
- public FieldList getCMSFields()
- public array summaryFields()
- public void onBeforeWrite()
- public String shortenURL()
- public static ShortURL|Null get_by_shortURL()
- public String AbsoluteLink()
- public string getLinkURL()
- public void provideGraphQLScaffolding()
Hierarchy
Extends
- gorriecoe\Link\Models\Link
Implements
- SilverStripe\GraphQL\Scaffolding\Interfaces\ScaffoldingProvider
Members
private
- $db
—
array
Database fields - $default_sort
—
array
Default sort ordering - $internal_types
—
array
Defines internal link types This will then prepend the domain and protocol to the LinkURL. - $plural_name
—
string
Plural name for CMS - $singular_name
—
string
Singular name for CMS - $table_name
—
string
Defines the database table name - $url_length
—
int
Defines the max length of the urls generated.
Methods
public
- AbsoluteLink() — Get the absolute URL for this page, including protocol and host.
- getCMSFields() — CMS Fields
- getLinkURL() — Prepend the domain and protoocol to the LinkURL if its internal.
- get_by_shortURL() — Return the first ShortURL matching the given shortURL.
- onBeforeWrite() — Event handler called before writing to the database.
- provideGraphQLScaffolding()
- shortenURL() — Creates a shortenURLed url path.
- summaryFields() — Get the default summary fields for this object.