friendica/src/Module
2020-01-05 00:04:55 +01:00
..
Admin Remove get_server() in favor of Search::getGlobalDirectory() 2020-01-05 00:04:55 +01:00
Api/Mastodon Add user contact data superseding to Mastodon\Account::create 2019-12-30 06:12:51 -05:00
Base
Contact
Debug Rework Feed::import parameters 2020-01-03 09:26:28 -05:00
Diaspora
Filer
HTTPException
Item Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Notifications
Profile
Search Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Security Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Settings Move redundant System::baseUrl() to DI::baseUrl() calls 2019-12-30 23:00:08 +01:00
Special
WellKnown Fix fatal errors caused by PR 8019 2019-12-30 01:17:16 +00:00
AccountManagementControlDocument.php
Acctlink.php
AllFriends.php Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Apps.php
Attach.php
BaseAdminModule.php Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
BaseSearchModule.php Remove get_server() in favor of Search::getGlobalDirectory() 2020-01-05 00:04:55 +01:00
BaseSettingsModule.php Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Bookmarklet.php Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Contact.php Merge pull request #8037 from MrPetovan/bug/notices 2019-12-30 23:41:23 +01:00
Credits.php
Delegation.php
Directory.php Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Feed.php
FollowConfirm.php
Followers.php
Following.php
Friendica.php
Group.php Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Hashtag.php
Help.php Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
Home.php Replace deprecated $a->page with DI::page() 2019-12-30 20:02:09 +01:00
HoverCard.php Replace obsolete references to App baseURL and getApp by DI 2019-12-29 21:50:15 -05:00
Inbox.php
Install.php
Invite.php
Like.php
Magic.php Fix fatal errors caused by PR 8019 2019-12-30 01:17:16 +00:00
Maintenance.php
Manifest.php
NodeInfo.php
Objects.php Add necessary call to BaseUrl->get() in Module\Objects 2019-12-31 12:25:41 -05:00
Oembed.php
OpenSearch.php Fix fatal errors caused by PR 8019 2019-12-30 01:17:16 +00:00
Outbox.php
Owa.php
Photo.php
Pinned.php
Profile.php Move redundant System::baseUrl() to DI::baseUrl() calls 2019-12-30 23:00:08 +01:00
Proxy.php
PublicRSAKey.php
RandomProfile.php
README.md
ReallySimpleDiscovery.php
Register.php Fix fatal errors caused by PR 8019 2019-12-30 01:17:16 +00:00
RobotsTxt.php
Smilies.php
Starred.php
Statistics.php
Theme.php
ThemeDetails.php
ToggleMobile.php
Tos.php Correctly capitalize DI::baseUrl in Module\Tos 2019-12-31 12:19:12 -05:00
Welcome.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.