mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 01:09:41 +00:00 
			
		
		
		
	Removed deprecated node parts
This commit is contained in:
		| @@ -1,70 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Controller; | ||||
|  | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Symfony\Component\HttpFoundation\Response; | ||||
| use Symfony\Component\Routing\Annotation\Route; | ||||
| use Symfony\Component\HttpFoundation\RedirectResponse; | ||||
| use App\Entity\Meta\RelationInterface; | ||||
| use App\Entity\Meta\Relation; | ||||
|  | ||||
| /** | ||||
|  * @todo IMPLEMENT SECURITY! | ||||
|  * @todo Refactor! | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| class NodeController extends AbstractEntityController | ||||
| { | ||||
|     /** | ||||
|      * @Route("/node/{id}.{_format}", defaults={"_format"="html"}) | ||||
|      */ | ||||
|     public function show(Request $request, int $id): Response | ||||
|     { | ||||
|         /** | ||||
|          * @var RelationInterface | ||||
|          */ | ||||
|         $relation = $this->loadEntityById($id); | ||||
|         $view = $this->view($relation, 200) | ||||
|         ->setTemplate('node/view/standard.html.twig') | ||||
|         ->setTemplateVar('node'); | ||||
|  | ||||
|         return $this->handleView($view); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Route("/node/{id}/law.{_format}", defaults={"_format"="html"}) | ||||
|      */ | ||||
|     public function law(int $id): RedirectResponse | ||||
|     { | ||||
|         $lawId = $this->loadEntityById($id)->getLaw()->getId(); | ||||
|  | ||||
|         return $this->redirectToRouteById('app_law_show', $lawId); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Route("/node/{id}/parents.{_format}", defaults={"_format"="html"}) | ||||
|      */ | ||||
|     public function parents(int $id): Response | ||||
|     { | ||||
|         /* | ||||
|          * @todo Implement | ||||
|          */ | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @Route("/node/{id}/childs.{_format}", defaults={"_format"="html"}) | ||||
|      */ | ||||
|     public function childs(int $id): Response | ||||
|     { | ||||
|         /* | ||||
|          * @todo Implement | ||||
|          */ | ||||
|     } | ||||
|  | ||||
|     protected function setEntityName(): void | ||||
|     { | ||||
|         $this->entityName = Relation::class; | ||||
|     } | ||||
| } | ||||
| @@ -1,9 +0,0 @@ | ||||
| {% extends "frames/default.html.twig" %} | ||||
| {% block title %} | ||||
| 	{% trans %} | ||||
| 	Node | ||||
| 	{% endtrans %} | ||||
| {% endblock %} | ||||
| {% block sub_navigation %} | ||||
|     {% include 'frames/structure/navbar/node_sub.html.twig'%} | ||||
| {% endblock %} | ||||
| @@ -1,13 +0,0 @@ | ||||
| {% if nodeList.isEmpty %} | ||||
| {% trans %} | ||||
| This list doesn't contain elements. | ||||
| {% endtrans %} | ||||
| {% else %} | ||||
| <ul> | ||||
| 	{% for node in nodeList %} | ||||
| 	<li><a href="{{ path('app_node_show',{'id':node.id}) }}" class=" nav-link"> <i | ||||
| 			class="fas fa-globe"></i> {% trans %}Node{% endtrans %} {{ node.id }} | ||||
| 	</a></li> | ||||
| 	{% endfor %} | ||||
| </ul> | ||||
| {% endif %} | ||||
| @@ -1,34 +0,0 @@ | ||||
| {% extends "node/node.html.twig" %} | ||||
| {% block content %} | ||||
| <h1> | ||||
| 	{% trans %} | ||||
| 	Node | ||||
| 	{% endtrans %} | ||||
| 	# | ||||
| 	{{ node.id }} | ||||
| </h1> | ||||
| {% trans %} | ||||
| Manages | ||||
| {% endtrans %} | ||||
| <a href="{{ path('app_source_show',{'id':node.source.id})}}"> {% trans with {'%node.source.id%':node.source.id}%} | ||||
| 	source #%node.source.id% {% endtrans %} | ||||
| </a> | ||||
| . | ||||
| <h2> | ||||
| 	{% trans %} | ||||
| 	Relatives | ||||
| 	{% endtrans %} | ||||
| </h2> | ||||
| <h3> | ||||
| 	{% trans %} | ||||
| 	First Generation Parents | ||||
| 	{% endtrans %} | ||||
| </h3> | ||||
| {% include "node/structure/_list.html.twig" with {'nodeList':node.parents}%} | ||||
| <h3> | ||||
| 	{% trans %} | ||||
| 	First Generation Childs | ||||
| 	{% endtrans %} | ||||
| </h3> | ||||
| {% include "node/structure/_list.html.twig" with {'nodeList':node.childs}%} | ||||
| {% endblock %} | ||||
		Reference in New Issue
	
	Block a user