Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
systems:yii2:yii_2.0_third_party_components [2017/07/07 14:04] smayr [yii2-timepicker TimePicker / DateTimePicker] |
systems:yii2:yii_2.0_third_party_components [2018/02/05 14:42] (current) smayr [PHPOffice/PhpSpreadsheet] |
||
---|---|---|---|
Line 11: | Line 11: | ||
Then, remove references to that package within your app. | Then, remove references to that package within your app. | ||
+ | == Fixing Composer Issues (composer.json ) == | ||
+ | |||
+ | Issue: When issuing a '' | ||
+ | |||
+ | Solution: | ||
+ | <code javascript> | ||
+ | " | ||
+ | //... | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Add: | ||
+ | <code javascript> | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | </ | ||
== JQuery UI == | == JQuery UI == | ||
Line 917: | Line 944: | ||
</ | </ | ||
- | == yii2-phpexcel PhpExcel == | + | == yii2-phpexcel PhpExcel |
Get documentation from: | Get documentation from: | ||
* [[https:// | * [[https:// | ||
Line 926: | Line 953: | ||
</ | </ | ||
+ | == PHPOffice/ | ||
+ | Get documentation from: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | Install the extension: | ||
+ | <code bash> | ||
+ | $ composer require phpoffice/ | ||
+ | </ | ||
+ | |||
+ | Example: | ||
+ | <code php> | ||
+ | <?php | ||
+ | |||
+ | require ' | ||
+ | |||
+ | use PhpOffice\PhpSpreadsheet\Spreadsheet; | ||
+ | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; | ||
+ | |||
+ | $spreadsheet = new Spreadsheet(); | ||
+ | $sheet = $spreadsheet-> | ||
+ | $sheet-> | ||
+ | |||
+ | $writer = new Xlsx($spreadsheet); | ||
+ | $writer-> | ||
+ | </ | ||
== DatePicker == | == DatePicker == | ||
* run in your project dir: < | * run in your project dir: < | ||
Line 1533: | Line 1586: | ||
* [[https:// | * [[https:// | ||
+ | == Font Awesome == | ||
+ | * Download FA libraries from [[http:// | ||
+ | * Copy libraries to '' | ||
+ | * Add references to '' | ||
+ | <?php | ||
+ | namespace app\assets; | ||
+ | |||
+ | use yii\web\AssetBundle; | ||
+ | |||
+ | /** | ||
+ | * @author Qiang Xue < | ||
+ | * @since 2.0 | ||
+ | */ | ||
+ | class AppAsset extends AssetBundle | ||
+ | { | ||
+ | public $basePath = ' | ||
+ | public $baseUrl = ' | ||
+ | public $css = [ | ||
+ | ' | ||
+ | ' | ||
+ | ]; | ||
+ | public $js = [ | ||
+ | ]; | ||
+ | public $depends = [ | ||
+ | ' | ||
+ | ' | ||
+ | ]; | ||
+ | } | ||
+ | </ | ||
+ | * Use font icons in view: <code php> | ||
+ | <?= Html:: | ||
+ | [' | ||
+ | [' | ||
+ | ) ?> | ||
+ | </ | ||
+ | |||
+ | == Barcoding (yii2-barcode-generator) == | ||
+ | Run <code bash>$ php composer.phar require --prefer-dist vilochane/ | ||
+ | |||
+ | Or add the following to '' | ||
+ | <code javascript> | ||
+ | " | ||
+ | " | ||
+ | //... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Run '' | ||
+ | |||
+ | Usage: | ||
+ | <code php> | ||
+ | <?php | ||
+ | use barcode\barcode\BarcodeGenerator as BarcodeGenerator; | ||
+ | |||
+ | <!--This element id should be passed on to options--> | ||
+ | <div id=" | ||
+ | |||
+ | $optionsArray = [ | ||
+ | ' | ||
+ | ' | ||
+ | //' | ||
+ | ' | ||
+ | // code128, codabar, msi, datamatrix | ||
+ | ]; | ||
+ | echo BarcodeGenerator:: | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | References: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | == Mermaid JS support == | ||
+ | * Download distribution package from [[https:// | ||
+ | * Get documentation in [[https:// | ||
+ | |||
+ | Edit asset references in '' | ||
+ | <code php> | ||
+ | <?php | ||
+ | namespace app\assets; | ||
+ | |||
+ | use yii\web\AssetBundle; | ||
+ | |||
+ | /** | ||
+ | * @author Qiang Xue < | ||
+ | * @since 2.0 | ||
+ | */ | ||
+ | class AppAsset extends AssetBundle | ||
+ | { | ||
+ | public $basePath = ' | ||
+ | public $baseUrl = ' | ||
+ | public $css = [ | ||
+ | ' | ||
+ | ]; | ||
+ | public $js = [ | ||
+ | ' | ||
+ | ]; | ||
+ | public $depends = [ | ||
+ | ' | ||
+ | ' | ||
+ | ]; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Add '' | ||
+ | <code php> | ||
+ | <div class=' | ||
+ | graph TD; | ||
+ | A-->B; | ||
+ | A-->C; | ||
+ | B-->D; | ||
+ | C-->D; | ||
+ | </ | ||
+ | </ | ||
+ | == Yii2 Shopping Cart == | ||
+ | * [[https:// | ||
+ | * [[https:// |