<?php
/**
* Inheritance: no
* Variants: no
*
* Fields Summary:
* - firstname [input]
* - lastname [input]
* - position [input]
* - phone [input]
* - email [email]
* - photo [image]
*/
namespace Pimcore\Model\DataObject;
use Pimcore\Model\DataObject\Exception\InheritanceParentNotFoundException;
use Pimcore\Model\DataObject\PreGetValueHookInterface;
/**
* @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing getList(array $config = [])
* @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByFirstname($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByLastname($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByPosition($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByPhone($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByEmail($value, $limit = 0, $offset = 0, $objectTypes = null)
* @method static \Pimcore\Model\DataObject\Ansprechpartner\Listing|\Pimcore\Model\DataObject\Ansprechpartner|null getByPhoto($value, $limit = 0, $offset = 0, $objectTypes = null)
*/
class Ansprechpartner extends Concrete
{
protected $o_classId = "1";
protected $o_className = "ansprechpartner";
protected $firstname;
protected $lastname;
protected $position;
protected $phone;
protected $email;
protected $photo;
/**
* @param array $values
* @return \Pimcore\Model\DataObject\Ansprechpartner
*/
public static function create($values = array()) {
$object = new static();
$object->setValues($values);
return $object;
}
/**
* Get firstname - Vorname
* @return string|null
*/
public function getFirstname(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("firstname");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->firstname;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set firstname - Vorname
* @param string|null $firstname
* @return \Pimcore\Model\DataObject\Ansprechpartner
*/
public function setFirstname(?string $firstname)
{
$this->firstname = $firstname;
return $this;
}
/**
* Get lastname - Nachname
* @return string|null
*/
public function getLastname(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("lastname");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->lastname;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set lastname - Nachname
* @param string|null $lastname
* @return \Pimcore\Model\DataObject\Ansprechpartner
*/
public function setLastname(?string $lastname)
{
$this->lastname = $lastname;
return $this;
}
/**
* Get position - Position
* @return string|null
*/
public function getPosition(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("position");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->position;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set position - Position
* @param string|null $position
* @return \Pimcore\Model\DataObject\Ansprechpartner
*/
public function setPosition(?string $position)
{
$this->position = $position;
return $this;
}
/**
* Get phone - Telefon
* @return string|null
*/
public function getPhone(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("phone");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->phone;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set phone - Telefon
* @param string|null $phone
* @return \Pimcore\Model\DataObject\Ansprechpartner
*/
public function setPhone(?string $phone)
{
$this->phone = $phone;
return $this;
}
/**
* Get email - E-Mail
* @return string|null
*/
public function getEmail(): ?string
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("email");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->email;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set email - E-Mail
* @param string|null $email
* @return \Pimcore\Model\DataObject\Ansprechpartner
*/
public function setEmail(?string $email)
{
$this->email = $email;
return $this;
}
/**
* Get photo - Foto
* @return \Pimcore\Model\Asset\Image|null
*/
public function getPhoto(): ?\Pimcore\Model\Asset\Image
{
if ($this instanceof PreGetValueHookInterface && !\Pimcore::inAdmin()) {
$preValue = $this->preGetValue("photo");
if ($preValue !== null) {
return $preValue;
}
}
$data = $this->photo;
if ($data instanceof \Pimcore\Model\DataObject\Data\EncryptedField) {
return $data->getPlain();
}
return $data;
}
/**
* Set photo - Foto
* @param \Pimcore\Model\Asset\Image|null $photo
* @return \Pimcore\Model\DataObject\Ansprechpartner
*/
public function setPhoto(?\Pimcore\Model\Asset\Image $photo)
{
$this->photo = $photo;
return $this;
}
}