kgaut/kgaut_tools 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kgaut/kgaut_tools

最新稳定版本:2.0.23

Composer 安装命令:

composer require kgaut/kgaut_tools

包简介

Tools and services for drupal 8

关键字:

README 文档

README

Installation

composer require kgaut/kgaut_tools

Features

CleanString Service

Transliterate and remove special char from a string.

$mystring = "Hello World";
// 'hello-world'
$cleanString = \Drupal::service('kgaut_tools.stringcleaner')->clean($categorie->name); 
//'hello_world'
$cleanStringWithoutDash = \Drupal::service('kgaut_tools.stringcleaner')->clean($categorie->name,true); 

TranslationImporter Service

Allow to import translation for a given string with a given language.

Usage example :

$translationImporter = \Drupal::service('kgaut_tools.translation_importer');
$translationImporter->importTranslation("I love drupal", 'fr', "J'aime drupal");

Create image derivates during upload

Inspired by @flocondetoile's post : http://flocondetoile.fr/blog/generate-programmatically-image-styles-drupal-8

Add new useful var to all templates :

  • basepath : Drupal basepath() value (not always available)
  • pathtotheme : path to active theme
  • pathtotfiles : path to public files directory

User templates suggestions :

Add templates suggestions for user entity based on the view mode ie : user--compact.html.twig

统计信息

  • 总下载量: 13.51k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2020-02-19