2015-01-22 16:18:56 +00:00
|
|
|
<?php
|
|
|
|
|
2015-01-23 15:28:37 +00:00
|
|
|
namespace Wallabag\CoreBundle\Entity;
|
2015-01-22 16:18:56 +00:00
|
|
|
|
2015-10-11 20:22:24 +00:00
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
2015-01-22 16:18:56 +00:00
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2022-03-15 09:44:32 +00:00
|
|
|
use JMS\Serializer\Annotation\Groups;
|
2015-02-11 20:06:32 +00:00
|
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
2015-01-22 16:18:56 +00:00
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* Config.
|
2015-01-22 16:18:56 +00:00
|
|
|
*
|
2015-02-16 20:28:49 +00:00
|
|
|
* @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\ConfigRepository")
|
2019-08-08 07:36:03 +00:00
|
|
|
* @ORM\Table(
|
|
|
|
* name="`config`",
|
|
|
|
* indexes={
|
|
|
|
* @ORM\Index(name="config_feed_token", columns={"feed_token"}, options={"lengths"={255}}),
|
|
|
|
* }
|
|
|
|
* )
|
2015-01-22 16:18:56 +00:00
|
|
|
*/
|
|
|
|
class Config
|
|
|
|
{
|
2022-12-13 09:26:51 +00:00
|
|
|
public const REDIRECT_TO_HOMEPAGE = 0;
|
|
|
|
public const REDIRECT_TO_CURRENT_PAGE = 1;
|
2016-11-07 08:30:37 +00:00
|
|
|
|
2015-01-22 16:18:56 +00:00
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* @var int
|
2015-01-22 16:18:56 +00:00
|
|
|
*
|
2015-02-11 20:06:32 +00:00
|
|
|
* @ORM\Column(name="id", type="integer")
|
2015-01-22 16:18:56 +00:00
|
|
|
* @ORM\Id
|
2015-02-11 20:06:32 +00:00
|
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
2022-03-15 09:44:32 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
2015-01-22 16:18:56 +00:00
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* @var int
|
2015-01-22 16:18:56 +00:00
|
|
|
*
|
2015-02-16 20:28:49 +00:00
|
|
|
* @Assert\NotBlank()
|
2015-03-28 20:43:49 +00:00
|
|
|
* @Assert\Range(
|
|
|
|
* min = 1,
|
|
|
|
* max = 100000,
|
2016-03-09 07:59:08 +00:00
|
|
|
* maxMessage = "validator.item_per_page_too_high"
|
2015-03-28 20:43:49 +00:00
|
|
|
* )
|
2015-02-16 20:28:49 +00:00
|
|
|
* @ORM\Column(name="items_per_page", type="integer", nullable=false)
|
2022-03-15 09:44:32 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
2015-02-16 20:28:49 +00:00
|
|
|
*/
|
2015-03-28 13:27:45 +00:00
|
|
|
private $itemsPerPage;
|
2015-02-16 20:28:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @Assert\NotBlank()
|
|
|
|
* @ORM\Column(name="language", type="string", nullable=false)
|
2022-03-15 09:44:32 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
2015-01-22 16:18:56 +00:00
|
|
|
*/
|
2015-02-16 20:28:49 +00:00
|
|
|
private $language;
|
|
|
|
|
2015-03-28 13:27:45 +00:00
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var string|null
|
2015-03-28 13:27:45 +00:00
|
|
|
*
|
2019-04-25 12:12:56 +00:00
|
|
|
* @ORM\Column(name="feed_token", type="string", nullable=true)
|
2022-03-15 09:44:32 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
2015-03-28 13:27:45 +00:00
|
|
|
*/
|
2017-06-13 16:48:10 +00:00
|
|
|
private $feedToken;
|
2015-03-28 13:27:45 +00:00
|
|
|
|
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var int|null
|
2015-03-28 13:27:45 +00:00
|
|
|
*
|
2019-04-25 12:12:56 +00:00
|
|
|
* @ORM\Column(name="feed_limit", type="integer", nullable=true)
|
2015-03-28 20:43:49 +00:00
|
|
|
* @Assert\Range(
|
|
|
|
* min = 1,
|
|
|
|
* max = 100000,
|
2017-06-13 16:48:10 +00:00
|
|
|
* maxMessage = "validator.feed_limit_too_high"
|
2015-03-28 20:43:49 +00:00
|
|
|
* )
|
2022-03-15 09:44:32 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
2015-03-28 13:27:45 +00:00
|
|
|
*/
|
2017-06-13 16:48:10 +00:00
|
|
|
private $feedLimit;
|
2015-03-28 13:27:45 +00:00
|
|
|
|
2016-03-08 15:44:25 +00:00
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var float|null
|
2016-03-08 15:44:25 +00:00
|
|
|
*
|
|
|
|
* @ORM\Column(name="reading_speed", type="float", nullable=true)
|
2022-03-15 09:44:32 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
2016-03-08 15:44:25 +00:00
|
|
|
*/
|
|
|
|
private $readingSpeed;
|
|
|
|
|
2016-09-16 20:22:25 +00:00
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var string|null
|
2016-09-16 20:22:25 +00:00
|
|
|
*
|
|
|
|
* @ORM\Column(name="pocket_consumer_key", type="string", nullable=true)
|
|
|
|
*/
|
|
|
|
private $pocketConsumerKey;
|
|
|
|
|
2016-11-06 11:02:39 +00:00
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var int|null
|
2016-11-06 11:02:39 +00:00
|
|
|
*
|
2016-12-19 13:24:19 +00:00
|
|
|
* @ORM\Column(name="action_mark_as_read", type="integer", nullable=true, options={"default" = 0})
|
2022-03-15 09:44:32 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
2016-11-06 11:02:39 +00:00
|
|
|
*/
|
|
|
|
private $actionMarkAsRead;
|
|
|
|
|
2016-11-28 10:02:10 +00:00
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var int|null
|
2016-11-28 10:02:10 +00:00
|
|
|
*
|
2016-11-28 11:08:51 +00:00
|
|
|
* @ORM\Column(name="list_mode", type="integer", nullable=true)
|
2022-03-15 09:44:32 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
2016-11-28 10:02:10 +00:00
|
|
|
*/
|
2016-11-28 11:08:51 +00:00
|
|
|
private $listMode;
|
2016-11-28 10:02:10 +00:00
|
|
|
|
2023-06-13 13:02:48 +00:00
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var int|null
|
2023-06-13 13:02:48 +00:00
|
|
|
*
|
2023-06-14 12:50:17 +00:00
|
|
|
* @ORM\Column(name="display_thumbnails", type="integer", nullable=true, options={"default" = 1})
|
2023-06-13 13:02:48 +00:00
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
|
|
|
*/
|
|
|
|
private $displayThumbnails;
|
|
|
|
|
2023-07-29 10:26:44 +00:00
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var string|null
|
2023-07-29 10:26:44 +00:00
|
|
|
*
|
|
|
|
* @ORM\Column(name="font", type="text", nullable=true)
|
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
|
|
|
*/
|
|
|
|
private $font;
|
|
|
|
|
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var float|null
|
2023-07-29 10:26:44 +00:00
|
|
|
*
|
|
|
|
* @ORM\Column(name="fontsize", type="float", nullable=true)
|
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
|
|
|
*/
|
|
|
|
private $fontsize;
|
|
|
|
|
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var float|null
|
2023-07-29 10:26:44 +00:00
|
|
|
*
|
|
|
|
* @ORM\Column(name="line_height", type="float", nullable=true)
|
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
|
|
|
*/
|
|
|
|
private $lineHeight;
|
|
|
|
|
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var float|null
|
2023-07-29 10:26:44 +00:00
|
|
|
*
|
|
|
|
* @ORM\Column(name="max_width", type="float", nullable=true)
|
|
|
|
*
|
|
|
|
* @Groups({"config_api"})
|
|
|
|
*/
|
|
|
|
private $maxWidth;
|
|
|
|
|
|
|
|
/**
|
2023-11-16 08:36:47 +00:00
|
|
|
* @var string|null
|
2023-07-29 10:26:44 +00:00
|
|
|
*
|
|
|
|
* @ORM\Column(name="custom_css", type="text", nullable=true)
|
|
|
|
*/
|
|
|
|
private $customCSS;
|
|
|
|
|
2015-02-16 20:28:49 +00:00
|
|
|
/**
|
2023-12-30 22:32:36 +00:00
|
|
|
* @ORM\OneToOne(targetEntity="Wallabag\CoreBundle\Entity\User", inversedBy="config")
|
2015-02-16 20:28:49 +00:00
|
|
|
*/
|
|
|
|
private $user;
|
|
|
|
|
2015-10-11 15:14:50 +00:00
|
|
|
/**
|
2023-08-08 01:27:21 +00:00
|
|
|
* @var ArrayCollection<TaggingRule>
|
|
|
|
*
|
2015-10-11 15:14:50 +00:00
|
|
|
* @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\TaggingRule", mappedBy="config", cascade={"remove"})
|
2015-11-29 15:19:02 +00:00
|
|
|
* @ORM\OrderBy({"id" = "ASC"})
|
2015-10-11 15:14:50 +00:00
|
|
|
*/
|
|
|
|
private $taggingRules;
|
|
|
|
|
2019-06-23 20:13:06 +00:00
|
|
|
/**
|
2024-01-01 18:11:01 +00:00
|
|
|
* @var ArrayCollection<IgnoreOriginUserRule>
|
|
|
|
*
|
2019-06-23 20:13:06 +00:00
|
|
|
* @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\IgnoreOriginUserRule", mappedBy="config", cascade={"remove"})
|
|
|
|
* @ORM\OrderBy({"id" = "ASC"})
|
|
|
|
*/
|
|
|
|
private $ignoreOriginRules;
|
|
|
|
|
2015-02-16 20:28:49 +00:00
|
|
|
/*
|
|
|
|
* @param User $user
|
|
|
|
*/
|
2016-01-03 09:59:55 +00:00
|
|
|
public function __construct(User $user)
|
2015-02-16 20:28:49 +00:00
|
|
|
{
|
|
|
|
$this->user = $user;
|
2015-10-11 15:14:50 +00:00
|
|
|
$this->taggingRules = new ArrayCollection();
|
2019-06-23 20:13:06 +00:00
|
|
|
$this->ignoreOriginRules = new ArrayCollection();
|
2015-02-16 20:28:49 +00:00
|
|
|
}
|
2015-01-22 16:18:56 +00:00
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* Get id.
|
2015-01-22 16:18:56 +00:00
|
|
|
*
|
2015-05-30 11:52:26 +00:00
|
|
|
* @return int
|
2015-01-22 16:18:56 +00:00
|
|
|
*/
|
|
|
|
public function getId()
|
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* Set itemsPerPage.
|
|
|
|
*
|
|
|
|
* @param int $itemsPerPage
|
2015-01-22 16:18:56 +00:00
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
2015-02-16 20:28:49 +00:00
|
|
|
public function setItemsPerPage($itemsPerPage)
|
2015-01-22 16:18:56 +00:00
|
|
|
{
|
2015-03-28 13:27:45 +00:00
|
|
|
$this->itemsPerPage = $itemsPerPage;
|
2015-01-22 16:18:56 +00:00
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* Get itemsPerPage.
|
2015-02-16 20:28:49 +00:00
|
|
|
*
|
2015-05-30 11:52:26 +00:00
|
|
|
* @return int
|
2015-02-16 20:28:49 +00:00
|
|
|
*/
|
|
|
|
public function getItemsPerPage()
|
|
|
|
{
|
2015-03-28 13:27:45 +00:00
|
|
|
return $this->itemsPerPage;
|
2015-02-16 20:28:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* Set language.
|
|
|
|
*
|
|
|
|
* @param string $language
|
2015-02-16 20:28:49 +00:00
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
|
|
public function setLanguage($language)
|
|
|
|
{
|
|
|
|
$this->language = $language;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* Get language.
|
2015-01-22 16:18:56 +00:00
|
|
|
*
|
2015-01-31 18:09:34 +00:00
|
|
|
* @return string
|
2015-01-22 16:18:56 +00:00
|
|
|
*/
|
2015-02-16 20:28:49 +00:00
|
|
|
public function getLanguage()
|
|
|
|
{
|
|
|
|
return $this->language;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* Set user.
|
|
|
|
*
|
2015-02-16 20:28:49 +00:00
|
|
|
* @return Config
|
|
|
|
*/
|
2024-02-19 08:31:30 +00:00
|
|
|
public function setUser(?User $user = null)
|
2015-02-16 20:28:49 +00:00
|
|
|
{
|
|
|
|
$this->user = $user;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-05-30 11:52:26 +00:00
|
|
|
* Get user.
|
2015-02-16 20:28:49 +00:00
|
|
|
*
|
2015-10-02 12:51:41 +00:00
|
|
|
* @return User
|
2015-02-16 20:28:49 +00:00
|
|
|
*/
|
|
|
|
public function getUser()
|
2015-01-22 16:18:56 +00:00
|
|
|
{
|
2015-02-16 20:28:49 +00:00
|
|
|
return $this->user;
|
2015-01-22 16:18:56 +00:00
|
|
|
}
|
2015-03-28 13:27:45 +00:00
|
|
|
|
|
|
|
/**
|
2017-06-13 16:48:10 +00:00
|
|
|
* Set feed Token.
|
2015-05-30 11:52:26 +00:00
|
|
|
*
|
2017-06-13 16:48:10 +00:00
|
|
|
* @param string $feedToken
|
2015-03-28 13:27:45 +00:00
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
2017-06-13 16:48:10 +00:00
|
|
|
public function setFeedToken($feedToken)
|
2015-03-28 13:27:45 +00:00
|
|
|
{
|
2017-06-13 16:48:10 +00:00
|
|
|
$this->feedToken = $feedToken;
|
2015-03-28 13:27:45 +00:00
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-06-13 16:48:10 +00:00
|
|
|
* Get feedToken.
|
2015-03-28 13:27:45 +00:00
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2017-06-13 16:48:10 +00:00
|
|
|
public function getFeedToken()
|
2015-03-28 13:27:45 +00:00
|
|
|
{
|
2017-06-13 16:48:10 +00:00
|
|
|
return $this->feedToken;
|
2015-03-28 13:27:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-06-13 16:48:10 +00:00
|
|
|
* Set Feed Limit.
|
2015-05-30 11:52:26 +00:00
|
|
|
*
|
2017-06-13 16:48:10 +00:00
|
|
|
* @param int $feedLimit
|
2015-03-28 13:27:45 +00:00
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
2017-06-13 16:48:10 +00:00
|
|
|
public function setFeedLimit($feedLimit)
|
2015-03-28 13:27:45 +00:00
|
|
|
{
|
2017-06-13 16:48:10 +00:00
|
|
|
$this->feedLimit = $feedLimit;
|
2015-03-28 13:27:45 +00:00
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-06-13 16:48:10 +00:00
|
|
|
* Get Feed Limit.
|
2015-03-28 13:27:45 +00:00
|
|
|
*
|
2016-01-03 09:59:55 +00:00
|
|
|
* @return int
|
2015-03-28 13:27:45 +00:00
|
|
|
*/
|
2017-06-13 16:48:10 +00:00
|
|
|
public function getFeedLimit()
|
2015-03-28 13:27:45 +00:00
|
|
|
{
|
2017-06-13 16:48:10 +00:00
|
|
|
return $this->feedLimit;
|
2015-03-28 13:27:45 +00:00
|
|
|
}
|
2015-10-11 15:14:50 +00:00
|
|
|
|
2016-03-08 15:44:25 +00:00
|
|
|
/**
|
|
|
|
* Set readingSpeed.
|
|
|
|
*
|
2016-03-18 12:12:09 +00:00
|
|
|
* @param float $readingSpeed
|
2016-03-08 15:44:25 +00:00
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
|
|
public function setReadingSpeed($readingSpeed)
|
|
|
|
{
|
|
|
|
$this->readingSpeed = $readingSpeed;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get readingSpeed.
|
|
|
|
*
|
2016-03-18 12:12:09 +00:00
|
|
|
* @return float
|
2016-03-08 15:44:25 +00:00
|
|
|
*/
|
|
|
|
public function getReadingSpeed()
|
|
|
|
{
|
|
|
|
return $this->readingSpeed;
|
|
|
|
}
|
|
|
|
|
2016-09-16 20:22:25 +00:00
|
|
|
/**
|
|
|
|
* Set pocketConsumerKey.
|
|
|
|
*
|
|
|
|
* @param string $pocketConsumerKey
|
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
|
|
public function setPocketConsumerKey($pocketConsumerKey)
|
|
|
|
{
|
|
|
|
$this->pocketConsumerKey = $pocketConsumerKey;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get pocketConsumerKey.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getPocketConsumerKey()
|
|
|
|
{
|
|
|
|
return $this->pocketConsumerKey;
|
|
|
|
}
|
|
|
|
|
2016-11-06 11:02:39 +00:00
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getActionMarkAsRead()
|
|
|
|
{
|
|
|
|
return $this->actionMarkAsRead;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int $actionMarkAsRead
|
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
|
|
public function setActionMarkAsRead($actionMarkAsRead)
|
|
|
|
{
|
|
|
|
$this->actionMarkAsRead = $actionMarkAsRead;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2016-11-28 10:02:10 +00:00
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
2016-11-28 11:08:51 +00:00
|
|
|
public function getListMode()
|
2016-11-28 10:02:10 +00:00
|
|
|
{
|
2016-11-28 11:08:51 +00:00
|
|
|
return $this->listMode;
|
2016-11-28 10:02:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-11-28 11:08:51 +00:00
|
|
|
* @param int $listMode
|
2016-11-28 10:02:10 +00:00
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
2016-11-28 11:08:51 +00:00
|
|
|
public function setListMode($listMode)
|
2016-11-28 10:02:10 +00:00
|
|
|
{
|
2016-11-28 11:08:51 +00:00
|
|
|
$this->listMode = $listMode;
|
2016-11-28 10:02:10 +00:00
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2023-08-08 01:27:21 +00:00
|
|
|
public function getDisplayThumbnails(): bool
|
2023-06-13 13:02:48 +00:00
|
|
|
{
|
2023-08-08 01:27:21 +00:00
|
|
|
return (bool) $this->displayThumbnails;
|
2023-06-13 13:02:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
|
|
public function setDisplayThumbnails(bool $displayThumbnails)
|
|
|
|
{
|
2023-08-08 01:27:21 +00:00
|
|
|
$this->displayThumbnails = $displayThumbnails ? 1 : 0;
|
2023-06-13 13:02:48 +00:00
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2023-07-29 10:26:44 +00:00
|
|
|
public function getFont(): ?string
|
|
|
|
{
|
|
|
|
return $this->font;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function setFont(string $font): self
|
|
|
|
{
|
|
|
|
$this->font = $font;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFontsize(): ?float
|
|
|
|
{
|
|
|
|
return $this->fontsize;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function setFontsize(float $fontsize): self
|
|
|
|
{
|
|
|
|
$this->fontsize = $fontsize;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getLineHeight(): ?float
|
|
|
|
{
|
|
|
|
return $this->lineHeight;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function setLineHeight(float $lineHeight): self
|
|
|
|
{
|
|
|
|
$this->lineHeight = $lineHeight;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getMaxWidth(): ?float
|
|
|
|
{
|
|
|
|
return $this->maxWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function setMaxWidth(float $maxWidth): self
|
|
|
|
{
|
|
|
|
$this->maxWidth = $maxWidth;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getCustomCSS(): ?string
|
|
|
|
{
|
|
|
|
return $this->customCSS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function setCustomCSS(?string $customCSS): self
|
|
|
|
{
|
|
|
|
$this->customCSS = $customCSS;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2015-10-11 15:14:50 +00:00
|
|
|
/**
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
|
|
public function addTaggingRule(TaggingRule $rule)
|
|
|
|
{
|
|
|
|
$this->taggingRules[] = $rule;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ArrayCollection<TaggingRule>
|
|
|
|
*/
|
|
|
|
public function getTaggingRules()
|
|
|
|
{
|
|
|
|
return $this->taggingRules;
|
|
|
|
}
|
2019-06-23 20:13:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
|
|
public function addIgnoreOriginRule(IgnoreOriginUserRule $rule)
|
|
|
|
{
|
|
|
|
$this->ignoreOriginRules[] = $rule;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ArrayCollection<IgnoreOriginUserRule>
|
|
|
|
*/
|
|
|
|
public function getIgnoreOriginRules()
|
|
|
|
{
|
|
|
|
return $this->ignoreOriginRules;
|
|
|
|
}
|
2015-01-22 16:18:56 +00:00
|
|
|
}
|