use Rapsys\PackBundle\Util\FacebookUtil;
use Rapsys\PackBundle\Util\ImageUtil;
-use Rapsys\PackBundle\Util\MapUtil;
use Rapsys\PackBundle\Util\SluggerUtil;
/**
/**
* Modified DateTime
*/
- protected \DateTime $modified;
+ protected \DateTimeImmutable $modified;
/**
* DatePeriod instance
* @param ImageUtil $image The image instance
* @param MailerInterface $mailer The mailer instance
* @param EntityManagerInterface $manager The manager instance
- * @param MapUtil $map The map instance
* @param PackageInterface $package The package instance
* @param RouterInterface $router The router instance
* @param Security $security The security instance
* @TODO move all that stuff to setSlugger('@slugger') setters with a calls: [ setSlugger: [ '@slugger' ] ] to unbload classes ???
* @TODO add a calls: [ ..., prepare: ['@???'] ] that do all the logic that can't be done in constructor because various things are not available
*/
- public function __construct(protected AuthorizationCheckerInterface $checker, protected ContainerInterface $container, protected AccessDecisionManagerInterface $decision, protected ManagerRegistry $doctrine, protected FacebookUtil $facebook, protected FormFactoryInterface $factory, protected ImageUtil $image, protected MailerInterface $mailer, protected EntityManagerInterface $manager, protected MapUtil $map, protected PackageInterface $package, protected RouterInterface $router, protected Security $security, protected SluggerUtil $slugger, protected RequestStack $stack, protected TranslatorInterface $translator, protected Environment $twig, protected int $limit = 5) {
+ public function __construct(protected AuthorizationCheckerInterface $checker, protected ContainerInterface $container, protected AccessDecisionManagerInterface $decision, protected ManagerRegistry $doctrine, protected FacebookUtil $facebook, protected FormFactoryInterface $factory, protected ImageUtil $image, protected MailerInterface $mailer, protected EntityManagerInterface $manager, protected PackageInterface $package, protected RouterInterface $router, protected Security $security, protected SluggerUtil $slugger, protected RequestStack $stack, protected TranslatorInterface $translator, protected Environment $twig, protected int $limit = 5) {
//Retrieve config
$this->config = $container->getParameter(RapsysAirBundle::getAlias());
//Without facebook image defined and texts
if (empty($parameters['facebook']['og:image']) && !empty($this->request) && !empty($parameters['fbimage']['texts']) && !empty($this->modified)) {
//Get facebook image
- $parameters['facebook'] += $this->facebook->getImage($this->request->getPathInfo(), $parameters['fbimage']['texts'], $this->modified->getTimestamp());
+ $parameters['facebook'] += $this->image->getFacebook($this->request->getPathInfo(), $parameters['fbimage']['texts'], $this->modified->getTimestamp());
}
//Call twig render method
'mailer.mailer' => MailerInterface::class,
'rapsysair.facebook_util' => FacebookUtil::class,
'rapsyspack.image_util' => ImageUtil::class,
- 'rapsyspack.map_util' => MapUtil::class,
'rapsyspack.path_package' => PackageInterface::class,
'rapsyspack.slugger_util' => SluggerUtil::class,
'rapsysuser.access_decision_manager' => AccessDecisionManagerInterface::class,