AppBundle\Entity\Post::setPdfName PHP Method

setPdfName() public method

public setPdfName ( $pdfName )
    public function setPdfName($pdfName)
    {
        $this->pdfName = $pdfName;
    }

Usage Example

 /**
  * @return array
  */
 public function generateNewPdf()
 {
     $pdfName = $this->generateUniquePdfName();
     $this->post->setPdfName($pdfName);
     $postSerialized = $this->serializer->serialize($this->post, 'json');
     $this->container->get('old_sound_rabbit_mq.generate_pdf_producer')->setContentType('application/json');
     $this->container->get('old_sound_rabbit_mq.generate_pdf_producer')->publish($postSerialized);
     $response = array('pdfName' => $pdfName);
     return $response;
 }