1. Development
  2. Include Multiple Context Types

Include Multiple Context Types

There is a case where 3rd party developer developed an EasySocial application that has more than one stream's context type in one app. Because of this multiple context types, some of the stream items doesn't get included or rendered in EasySocial Native Application.

In order to overcome this, we have created a trigger onGetSupportedApp for app developers to use to include the context types.

Adding the function to your app

  1. Add a function called onGetSupportedApp in your app file.

  2. Under that function, add the following codes and change the sample_context to your own context types:

        $apps[] = 'sample_context_1';
        $apps[] = 'sample_context_2';
        $apps[] = 'sample_context_3';
        .
        .
        $apps[] = 'sample_context_n';
    
    

    Basically, your function will be like this:

    public function onGetSupportedApp(&$apps)
    {
        $apps[] = 'sample_context_1';
        $apps[] = 'sample_context_2';
        $apps[] = 'sample_context_3';
    }
    
This article is separated into multiple sections as follow: