<?php
/**
* Inheritance: no
* Variants: no
Fields Summary:
- cat_url [input]
- localizedfields [localizedfields]
-- recipecategoryname [input]
-- meta_title [input]
-- meta_description [textarea]
- recipes_schema_markup_keywords [input]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\Recipecategory\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByCat_url($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByLocalizedfields($field, $value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByRecipecategoryname($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByMeta_title($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByMeta_description($value, $locale = null, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Recipecategory\Listing|\Pimcore\Model\DataObject\Recipecategory|null getByRecipes_schema_markup_keywords($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class Recipecategory extends Concrete
{
protected $o_classId = "11";
protected $o_className = "recipecategory";
protected $cat_url;
protected $localizedfields;
protected $recipes_schema_markup_keywords;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\Recipecategory
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get cat_url - Recipe Category URL
* @return string|null
*/
public function getCat_url(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("cat_url");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->cat_url;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set cat_url - Recipe Category URL
* @param string|null $cat_url
* @return \Pimcore\Model\DataObject\Recipecategory
*/
public function setCat_url(?string $cat_url)
{
$this->cat_url = $cat_url;
return $this;
}
/**
* Get localizedfields -
* @return \Pimcore\Model\DataObject\Localizedfield|null
*/
public function getLocalizedfields(): ?\Pimcore\Model\DataObject\Localizedfield
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("localizedfields");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->getClass()->getFieldDefinition("localizedfields")->preGetData($this);
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Get recipecategoryname - Recipe Category Name
* @return string|null
*/
public function getRecipecategoryname($language = null): ?string
{
$data = $this->getLocalizedfields()->getLocalizedValue("recipecategoryname", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("recipecategoryname");
if ($preValue !== null) {
return $preValue;
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Get meta_title - Meta Title
* @return string|null
*/
public function getMeta_title($language = null): ?string
{
$data = $this->getLocalizedfields()->getLocalizedValue("meta_title", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("meta_title");
if ($preValue !== null) {
return $preValue;
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Get meta_description - Meta Description
* @return string|null
*/
public function getMeta_description($language = null): ?string
{
$data = $this->getLocalizedfields()->getLocalizedValue("meta_description", $language);
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("meta_description");
if ($preValue !== null) {
return $preValue;
}
}
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set localizedfields -
* @param \Pimcore\Model\DataObject\Localizedfield|null $localizedfields
* @return \Pimcore\Model\DataObject\Recipecategory
*/
public function setLocalizedfields(?\Pimcore\Model\DataObject\Localizedfield $localizedfields)
{
$hideUnpublished = \Pimcore\Model\DataObject\Concrete::getHideUnpublished();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished(false);
$currentData = $this->getLocalizedfields();
\Pimcore\Model\DataObject\Concrete::setHideUnpublished($hideUnpublished);
$this->markFieldDirty("localizedfields", true);
$this->localizedfields = $localizedfields;
return $this;
}
/**
* Set recipecategoryname - Recipe Category Name
* @param string|null $recipecategoryname
* @return \Pimcore\Model\DataObject\Recipecategory
*/
public function setRecipecategoryname (?string $recipecategoryname, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("recipecategoryname", $recipecategoryname, $language, !$isEqual);
return $this;
}
/**
* Set meta_title - Meta Title
* @param string|null $meta_title
* @return \Pimcore\Model\DataObject\Recipecategory
*/
public function setMeta_title (?string $meta_title, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("meta_title", $meta_title, $language, !$isEqual);
return $this;
}
/**
* Set meta_description - Meta Description
* @param string|null $meta_description
* @return \Pimcore\Model\DataObject\Recipecategory
*/
public function setMeta_description (?string $meta_description, $language = null)
{
$isEqual = false;
$this->getLocalizedfields()->setLocalizedValue("meta_description", $meta_description, $language, !$isEqual);
return $this;
}
/**
* Get recipes_schema_markup_keywords - Recipes Schema Markup Keywords
* @return string|null
*/
public function getRecipes_schema_markup_keywords(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("recipes_schema_markup_keywords");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->recipes_schema_markup_keywords;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set recipes_schema_markup_keywords - Recipes Schema Markup Keywords
* @param string|null $recipes_schema_markup_keywords
* @return \Pimcore\Model\DataObject\Recipecategory
*/
public function setRecipes_schema_markup_keywords(?string $recipes_schema_markup_keywords)
{
$this->recipes_schema_markup_keywords = $recipes_schema_markup_keywords;
return $this;
}
}