Project

General

Profile

Actions

Feature proposal #4993

closed

Create plugin API library files for activity handling

Feature proposal #4993: Create plugin API library files for activity handling

Added by krileon almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
08 January 2015
Due date:
% Done:

100%

Estimated time:

Description

Further generalize and improve the usability of the activity API then turn it into a namespaced plugin API library that adds to CBLib.

Updated by krileon almost 11 years ago Actions #1

  • Target version changed from 708 to 4.0.0

Updated by krileon almost 11 years ago Actions #2

  • Target version changed from 4.0.0 to 3.0.0

This is going to be necessary to decouple the activity logging. The various plugins should make a call to CBs DI to grab the CBActivity class. This class should allow easy construction of an activity entry. Table class needs to go in there as well. Suggested structure:

CBActivity/Table/ActivityTable.php
CBActivity/Table/HiddenTable.php
CBActivity/CBActivity.php

Should be accessed same way session DI usage is used in TableBrowser. Example as follows.

Application::DI()->get( 'Plugin\CBActivity\CBActivity' )

Updated by krileon almost 11 years ago Actions #3

  • Priority changed from Normal to High

Updated by krileon almost 11 years ago Actions #4

The Activity.php should have a constructor to supply the type, subtype, and item. From there object functions should be able to store activity, output an activity row, output a stream (activity or comment, either one).. needs further thought, but the api should be able to construct the query and output the stream (template included).

Updated by krileon almost 11 years ago Actions #5

Actually this should eventually have the following base classes.

Stream.php
Activity.php
Comment.php
Like.php
Share.php

The stream api should handle displaying a comment or activity stream. This means it handles the query and output functionality. Activity should handle activity management, which is simple create, edit, save, delete, etc.. the same applies to Comment except it handles commenting.. these should also handle single entry display, but no stream handling. Like should handle display of the thumbs up, thumbs down, and toast icons as well as their storage behavior.

Initially there should only be the following though.

Stream.php
Activity.php

Updated by krileon almost 11 years ago Actions #6

Seams silly to have a class for a class. Let the table classes handle storage. Instead probably the below would be good.

Stream.php
StreamInerface.php
Like.php
LikeInterface.php
Share.php
ShareInterface.php

These purely handle the display aspects. Storage is already handled very well with table objects, as it should be, so there isn't need for an additional class to just call existing table behavior.

Updated by krileon almost 11 years ago Actions #7

CBActivity.php would contain the global functions (e.g. cbactivityClass functions).

Updated by krileon over 10 years ago Actions #8

  • % Done changed from 0 to 50

Updated by krileon over 10 years ago Actions #9

  • % Done changed from 50 to 80

Updated by krileon over 10 years ago Actions #10

  • % Done changed from 80 to 100

Updated by krileon over 10 years ago Actions #11

  • Status changed from Assigned to Resolved

Updated by krileon over 10 years ago Actions #12

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom