stiti / sharethisbundle
Share This Symfony Bundle
dev-master / 1.0.x-dev
2016-10-18 21:50 UTC
Requires
- php: >=5.3.3
- symfony/symfony: >=2.7
This package is not auto-updated.
Last update: 2024-09-18 19:12:48 UTC
README
欢迎来到 sharethisBundle - 一个用于创建 Share This 按钮的 Symfony 扩展包
安装
步骤 1: 下载 Bundle
Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:
$ composer require stiti/sharethisbundle 1.0.x-dev
Step 2: Enable the Bundle
~~~~~~~~~~~~~~~~~~~~~~~~~
Then, enable the bundle by adding the following line in the ````app/AppKernel.php````
file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new SharethisBundle\SharethisBundle(),
);
// ...
}
// ...
}
Step 3: Configure the bundle
_sharethis-api: http://tools.sharethis.com/get-sharing-tools/#
# app/config/config.yml
sharethis:
publisher : #Your api key
Usage
In your template twig insert this code
{{ render(controller('SharethisBundle:Share:share')) }}