定制 aldaflux/doc-img-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

aldaflux/doc-img-bundle

Composer 安装命令:

composer require aldaflux/doc-img-bundle

包简介

Symfony Bundle for test

关键字:

README 文档

README

Insert into AppKernel.php

 new Aldaflux\DocImgBundle\AldafluxDocImgBundle(),

Insert into config.yml...

  aldaflux_doc_img:
    web_dir: "%kernel.root_dir%/../web"

and verify this :

framework:
    templating:
        engines: ['twig']

in your template :

  <img src="/bundles/aldafluxdocimg/images/inda.png">
  <img src="https://upload.wikimedia.org/wikipedia/fr/thumb/9/94/Logo_Microsoft_Word_2013.png/220px-Logo_Microsoft_Word_2013.png">

IMPORTANT ! : use double quote, simple quote don't work...

in your controller :

  $view_html = $this->renderView('AldafluxDocImgBundle:Default:example.html.twig');
  $view_mht=$this->get('HtmlToMht')->GenereHtmlToMht($view_html);

you can write the view in a file (".doc") or send it in response

        $response = new Response();
        $response->headers->set('Cache-Control', 'private');
        $response->headers->set('Content-type', "application/vnd.ms-word");
        $response->headers->set('Content-Disposition', 'attachment; filename="file.doc"');
        $response->sendHeaders();
        $response->setContent($view_mht);
        return ($response);

If you want test fonctionality , add this to routing.yml:

aldaflux_doc_img:
    resource: "@AldafluxDocImgBundle/Controller"
    type:     annotation

and go to http://yourserver/aldaflux/

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2018-11-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固