OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Differentiate SystemCalendar and CalendarEvent

This topic contains 1 reply, has 1 voice, and was last updated by  zhex900 6 years, 9 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #25435

    zhex900
    Participant

    Hi,

    I have created an CalendarEventTypeExtension. Both CalendarEvent and System Calendar Event use it. I want to differentiate CalendarEvent and System Calendar Event in CalendarEventTypeExtension. Is there a way to do it?

    This is what I want to do.
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
    if (SystemCalendar){
    $builder->add(‘field 1’)
    }else{
    $builder->add(‘field 2’)
    }

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #25436

    zhex900
    Participant

    I have found a solution. I injected a requestStack into my typeExtension. Use the request to differentiate System Calendar and Calendar.

Viewing 1 replies (of 1 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top