PHP code example of paktdigital / focus-point-bundle

1. Go to this page and download the library: Download paktdigital/focus-point-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

paktdigital / focus-point-bundle example snippets


use PaktDigital\FocusPointBundle\Entity\ImageInterface;

class Image implements ImageInterface

/**
  * @ORM\Column(type="json_array")
  */
private $focusPoint = [];

public function getFocusPoint(): ?array
{
    return $this->focusPoint;
}

public function setFocusPoint(array $focusPoint): self
{
    $this->focusPoint = $focusPoint;

    return $this;
}
twig
<img src="{{ examplePage.image | paktdigital_focus('exampleImage') }}" />