nomidi\SeoHeroTool\SeoHeroToolDataObject
DataExtension which gives the ability to specify better Data for SEO, Twitter and Facebook
Synopsis
class SeoHeroToolDataObject
extends DataExtension
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static string $table_name = 'SeoHeroToolDataObject';
- public $current_meta_desc;
- // methods
- public void CanonicalURL()
- public void checkCanonicalSettings()
- public void MetaTitle()
- public string checkTitleYAMLSettings()
- public void updateCMSFields()
- private void getSchemaObject()
- public void checkBetterMetaDescriptionYaml()
- public void BetterMetaDescription()
- public string getBetterMetaDescription()
- private [Array] getFBFormFields()
- private [Array] getSeoFollowFields()
- private string getFBTypeFromConfig()
- public string checkFBType()
- public void onBeforeWrite()
- public [type] SMPreviewImage()
- public [type] checkSMImageYAMLSettings()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
- $db
- $has_one
- $table_name
public
- $current_meta_desc
Methods
private
- getFBFormFields() — getFBFormFields delivers the localized Data for the FBType-Field in an Array. This data is used in the frontend to generate the og:type value.
- getFBTypeFromConfig() — getFBTypeFromConfig returns, if existing, the value for FBType (which is used in og:type) which was stored for this classname in the config.yml file.
- getSchemaObject()
- getSeoFollowFields() — getSeoFolloFields delivers the localized Data for the Follow Type for robots.
public
- BetterMetaDescription()
- CanonicalURL()
- MetaTitle() — Function MetaTitle() overwrites the default title. If BetterSiteTitle is set, then this will be used. Otherwise it will check the if there is a yml file for this. If this is also not the case, the default title will be returned
- SMPreviewImage() — SMPreviewImage takes care for checking if an Image for Facebook and Twitter is defined. First check is if there is one uploaded in the backend, if not it will be checked if there is one set via the configuration.
- checkBetterMetaDescriptionYaml()
- checkCanonicalSettings()
- checkFBType() — checkFBType checks and returns the value which is used in og:type. This value can either be selected via the backend or can be generated via the config.yml.
- checkSMImageYAMLSettings() — checkSMImageYAMLSettings checks if an Image for twitter or facebook is set correctly if configured via configuration file
- checkTitleYAMLSettings() — checkTitleYAMLSettings checks if there is a title configuration for the given classname
- getBetterMetaDescription() — BetterMetaDescription returns the current MetaDescription.
- onBeforeWrite() — onBeforeWrite checks before the dataobject gets written. If the MetaDescription is empty, then it will generate a Description from the Content.
- updateCMSFields() — udpateCMSFields updates the CMS Fields and adds the fields from the SeoHeroToolDataObject-Extension.