This topic contains 1 reply, has 2 voices, and was last updated by Yurii Muratov 6 years, 8 months ago.
- Topic
Hi guys,
Can someone tell me how do i show a custom entity (recalls) associated to case entity in the entity activity list?
I have done this like in this documentation: https://github.com/orocrm/platform/tree/master/src/Oro/Bundle/ActivityBundle
I don’t know why it is´nt rendering in the widget, it alredy renders the form to save and it is saved in the database, but it is not rendering in the activity list block. Here is my code for activity list:
Activity list action:
1234567891011121314151617181920/*** @Route("/recall")*/class RecallController extends Controller{/*** @Route(* "/activity/view/{entityClass}/{entityId}",* name="linio_recall_widget_recalls"* )** @AclAncestor("linio_recall_view")* @Template("LinioRecallBundle:Recall:recalls.html.twig")*/public function widgetAction($entityClass, $entityId){return ['entity' => $this->get('oro_entity.routing_helper')->getEntity($entityClass, $entityId),];}Template:
12345678{% import 'OroUIBundle::macros.html.twig' as UI %}<div class="widget-content">{{ dataGrid.renderGrid('activity-recall-grid', {entityClass: oro_class_name(entity, true),entityId: entity.id}) }}</div>The grid:
12345678910111213activity-recall-grid:extends: widget-base-recalls-gridfilters:columns:notes:type: stringdata_name: recall.notesdateTime:type: datetimedata_name: recall.createdAtsource:type: stringdata_name: recall.sourceAnd my custom entity annotation:
123456789101112131415161718192021222324252627282930313233/*** @ORM\Entity(repositoryClass="Linio\CRM\Bundle\RecallBundle\Entity\Repository\RecallRepository")* @ORM\Table(name="recalls")* @Config(* defaultValues={* "entity" = {* "icon" = "fa-repeat"* },* "ownership"={* "owner_type"="USER",* "owner_field_name" = "owner",* "owner_column_name" = "user_owner_id",* "organization_field_name" = "organization",* "organization_column_name" = "organization_id"* },* "security" = {* "type" = "ACL",* "group_name" = "",* "category" = "account_management"* },* "grouping" = {* "groups" = {"activity"}* },* "activity" = {* "route" = "linio_recall_widget_recalls",* "acl" = "linio_recall_view",* "action_button_widget" = "oro_log_recall_button",* "action_link_widget" = "oro_log_recall_link"* }* }* )*/class Recall extends ExtendRecall implements DatesAwareInterface, UpdatedByAwareInterfaceThanks for the help!
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.