friendica/src/Module
Michael Vogel f0a0c6b822
Merge pull request #8982 from MrPetovan/task/8918-move-mod-common
Move mod/common.php to src/ Part 3: Add Module\Contact\Contacts class
2020-08-07 20:51:02 +02:00
..
Admin Periodically run an "optimize table" command for cache tables 2020-08-04 12:24:24 +00:00
Api Add common relationship methods to Model\ContactRelation 2020-08-03 13:34:10 -04:00
Contact Add new contact/{id}/contacts[/{type}] route and module 2020-08-06 22:59:09 -04:00
Conversation Useless info messages removed 2020-07-23 06:11:21 +00:00
Debug Remove url caching, locking cleanup 2020-08-06 18:53:45 +00:00
Diaspora
Filer Useless info messages removed 2020-07-23 06:11:21 +00:00
HTTPException
Item
Notifications EOL removed 2020-07-23 06:25:01 +00:00
Profile Create new page_tabs template 2020-08-06 22:59:09 -04:00
Search Test message removed 2020-08-04 05:46:00 +00:00
Security
Settings Poco and gcontact (mostly) removed 2020-08-01 16:15:18 +00:00
Special
Update
WellKnown
AccountManagementControlDocument.php
Acctlink.php
Apps.php EOL removed 2020-07-23 06:25:01 +00:00
Attach.php
BaseAdmin.php Add new admin debug module for ActivityPub 2020-07-20 00:39:17 -04:00
BaseApi.php
BaseNotifications.php
BaseProfile.php
BaseSearch.php "id" is not needed as a parameter 2020-07-31 04:28:26 +00:00
BaseSettings.php
Bookmarklet.php
Contact.php Merge pull request #8982 from MrPetovan/task/8918-move-mod-common 2020-08-07 20:51:02 +02:00
Credits.php
Delegation.php
Directory.php The local directory is now using the template function as well 2020-07-31 04:19:20 +00:00
Feed.php
FollowConfirm.php EOL removed 2020-07-23 06:25:01 +00:00
Followers.php
Following.php
Friendica.php AP: Always sign requests 2020-07-29 05:12:16 +00:00
FriendSuggest.php
Group.php Renamed function 2020-08-05 03:36:37 +00:00
Hashtag.php
Help.php
Home.php
HoverCard.php
Inbox.php
Install.php
Invite.php EOL removed 2020-07-23 06:25:01 +00:00
Like.php
Magic.php Rename "HTTPRequest::curl()" to HTTPRequest::get() 2020-07-21 03:14:01 -04:00
Maintenance.php
Manifest.php
NodeInfo110.php
NodeInfo120.php
NodeInfo210.php
NoScrape.php Poco and gcontact (mostly) removed 2020-08-01 16:15:18 +00:00
Objects.php
Oembed.php
OpenSearch.php
Outbox.php
Owa.php
PermissionTooltip.php Remove unnecessary parent call in PermissionTooltip::rawContent 2020-07-27 15:54:36 -04:00
Photo.php
Pinned.php
Proxy.php
PublicRSAKey.php
RandomProfile.php Random profiles now moved away from "gcontact" as well 2020-08-02 08:07:31 +00:00
README.md
ReallySimpleDiscovery.php
Register.php
RemoteFollow.php
RobotsTxt.php
Smilies.php
Starred.php
Statistics.php
Theme.php
ThemeDetails.php
ToggleMobile.php
Tos.php
Welcome.php
Worker.php
Xrd.php

Friendica\Module

The Module namespace contains the different modules of Friendica. Each module is loaded through the App.

There are mainly two types of modules:

  • frontend modules to interact with users
  • backend modules to interact with machine requests

Frontend modules

This type of modules mainly needs a template, which are generally located at view/templates/.

A frontend module should extend the BaseModule, especially the content() method.

Backend modules

This type of modules mainly responds either with encoded XML or with JSON output. It isn't intended to respond with human readable text.

A frontend module should extend the BaseModule, especially the rawContent() method.

Routing

Every module needs to be accessed within a route. The routes are defined inside Router->collectRoutes().

Use the given routes as a pattern for further routes.

The routing library and further documentation can be found here.