Edit tt_content in Frontend

https://github.com/wallpageNET/infochy_feeditexample

config.tx_extbase {
    persistence{
        enableAutomaticCacheClearing = 1
        updateReferenceIndex = 0
        classes {
            Infochy\InfochyContent\Domain\Model\Content {
                mapping {
                    tableName = tt_content
                    columns {
                        uid.mapOnProperty = uid
                        pid.mapOnProperty = pid
                        sorting.mapOnProperty = sorting
                        CType.mapOnProperty = contentType
                        header.mapOnProperty = header
                        bodytext.mapOnProperty = bodytext
                    }
                }
            }
        }
    }
}
class Content extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
   /**
    * uid
    *
    * @var string
    */
   protected $uid = '';

   /**
    * pid
    *
    * @var string
    */
   protected $pid = '';

   /**
    * header
    *
    * @var string
    */
   protected $header = '';

   /**
    * sorting
    *
    * @var string
    */
   protected $sorting = '';

   /**
    * contentType
    *
    * @var string
    */
   protected $contentType = '';

   /**
    * Gets the uid
    *
    * @return string $uid
    */
   public function getUid() {
      return $this->uid;
   }
   /**
    * Gets the pid
    *
    * @return string $pid
    */
   public function getPid() {
      return $this->pid;
   }

   /**
    * Returns the header
    *
    * @return string $header
    */
   public function getHeader() {
      return $this->header;
   }

   /**
    * Sets the header
    *
    * @param string $header
    * @return void
    */
   public function setHeader($header) {
      $this->header = $header;
   }

   /**
    * Returns the sorting
    *
    * @return string $sorting
    */
   public function getSorting() {
      return $this->sorting;
   }

   /**
    * Sets the sorting
    *
    * @param string $sorting
    * @return void
    */
   public function setSorting($sorting) {
      $this->sorting = $sorting;
   }

   /**
    * Returns the contentType
    *
    * @return string $contentType
    */
   public function getContentType() {
      return $this->contentType;
   }

   /**
    * Sets the contentType
    *
    * @param string $contentType
    * @return void
    */
   public function setContentType($contentType) {
      $this->contentType = $contentType;
   }

   /**
    * bodytext
    *
    * @var string
    */
   protected $bodytext = '';
   /**
    * Returns the bodytext
    *
    * @return string $bodytext
    */
   public function getBodytext() {
      return $this->bodytext;
   }

   /**
    * Sets the bodytext
    *
    * @param string $bodytext
    * @return void
    */
   public function setBodytext($bodytext) {
      $this->bodytext = $bodytext;
   }
}
class ContentRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
    public function setStoragePageId($storagePid) {
        $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings'); 
        $querySettings->setRespectStoragePage(FALSE); 
        $querySettings->setStoragePageIds(array($storagePid)); 
        $this->setDefaultQuerySettings($querySettings);
    }
    
}