. // }}} /** * ActivityPub implementation for GNU social * * @package GNUsocial * @category Actor * * @author Diogo Peralta Cordeiro <@diogo.site> * @copyright 2022 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ namespace Plugin\UnboundGroup; use App\Core\Event; use App\Core\Modules\Plugin; use App\Entity\Actor; use Plugin\UnboundGroup\Controller\GroupSettings; use Symfony\Component\HttpFoundation\Request; /** * When enabled, Adds ActivityPub "FEP-2100 Unbound Group and Organization" support to GNU social * * @copyright 2022 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ class UnboundGroup extends Plugin { public function onPopulateSettingsTabs(Request $request, string $section, array &$tabs): bool { if ($section === 'profile' && $request->get('_route') === 'group_actor_settings') { $tabs[] = [ 'title' => 'Linked', 'desc' => 'Link to this Group from another Group.', 'id' => 'settings-group-links-details', 'controller' => GroupSettings::groupLinks($request, Actor::getById((int) $request->get('id')), 'settings-group-links-details'), ]; } return Event::next; } }