Search by

sy / bootstrap-link

syone

Plugin for adding social media links component

1.1.3 2026-11-29 18:20 UTC

This package is auto-updated.

Last update: 2026-11-30 08:36:24 UTC


README

sy/bootstrap plugin for adding social media link component in your sy/project based application.

Installation

From your sy/project application directory:

composer require sy/bootstrap-link

The project's post-update-cmd hook then runs @sy install (sy/project 8.0.0, sy/bootstrap ≥ 2.2), which does the two things this package needs:

  1. flyway repair then migrate — on the core schema and on the plugin schema (flyway_link_history), from the package's own sql/ directory, so sql/install.sql is no longer copied into the project;
  2. assets/css/app.css — rebuilt when a plugin .scss file is newer than it; Gulp reads protected/vendor/sy/bootstrap-*/scss/*.scss directly, so scss/_bootstrap-link.scss is no longer copied into protected/scss nor imported into app.scss.

The package ships no template, no asset and no translation file. composer install-plugin no longer exists (sy/project 8.0.0); on a project older than that, run composer sy install after the composer require.

Add link section in the user account panel

Got to the file: protected\src\Component\User\AccountPanel.php

And add this method in the class:

	public function linkAction() {
		$service = \Project\Service\Container::getInstance();
		$user = $service->user->getCurrentUser();
		$p = new \Sy\Component\Html\Element('p');
		$p->addText($this->_('You can display on your page your web site or social media links'));
		$this->setComponent('NORTH', $p);
		$this->setComponent('CENTER', new \Sy\Bootstrap\Component\Link\Div('user-' . $user->id, true));
		$this->setComponent('SOUTH', new \Sy\Bootstrap\Component\Link\Create('user-' . $user->id));
	}