You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* @param \CmsModule\Content\Entities\FileEntity $photo
*/
public function setPhoto(\CmsModule\Content\Entities\FileEntity $photo = NULL)
{
$this->photo = $photo;
if ($this->photo) {
$this->photo->setParent($this->page->getDir());
$this->photo->setInvisible(true);
}
}
Formulář s editací přílohy
class FormFactory extends \Venne\Forms\FormFactory
{
public function configure(Form $form)
{
...
$form->addFileEntityInput('photo', 'Photo');
...
$form->addFileEntityInput('photos', 'Photos');
...
}
protected function getControlExtensions()
{
return array(
new \DoctrineModule\Forms\ControlExtensions\DoctrineExtension(),
new \CmsModule\Content\Forms\ControlExtensions\ControlExtension(),
new \FormsModule\ControlExtensions\ControlExtension(),
);
}
}