Skip to content

syframework/bootstrap-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sy/bootstrap-link

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

Installation

From your sy/project based application directory, run this command:

composer install-plugin link

NOTES

The install-plugin command will do all these following steps:

$ composer require sy/bootstrap-link

Database

Use the database installation script: sql/install.sql

CSS

Copy the scss file scss/_bootstrap-link.scss into your project scss directory: protected/scss

Import it in your app.scss file and rebuild the css file.


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));
	}

About

Plugin for adding social media link component

Resources

License

Stars

Watchers

Forks

Packages

No packages published