Project

General

Profile

Actions

Feature proposal #4993

closed

Create plugin API library files for activity handling

Added by krileon almost 10 years ago. Updated over 9 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.

Actions #1

Updated by krileon almost 10 years ago

  • Target version changed from 708 to 4.0.0
Actions #2

Updated by krileon over 9 years ago

  • 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' )

Actions #3

Updated by krileon over 9 years ago

  • Priority changed from Normal to High
Actions #4

Updated by krileon over 9 years ago

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).

Actions #5

Updated by krileon over 9 years ago

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

Actions #6

Updated by krileon over 9 years ago

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.

Actions #7

Updated by krileon over 9 years ago

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

Actions #8

Updated by krileon over 9 years ago

  • % Done changed from 0 to 50
Actions #9

Updated by krileon over 9 years ago

  • % Done changed from 50 to 80
Actions #10

Updated by krileon over 9 years ago

  • % Done changed from 80 to 100
Actions #11

Updated by krileon over 9 years ago

  • Status changed from Assigned to Resolved
Actions #12

Updated by krileon over 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF