di.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © 2016 Ihor Vansach (ihor@magefan.com). All rights reserved.
  5. * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
  6. *
  7. * Glory to Ukraine! Glory to the heroes!
  8. */
  9. -->
  10. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  11. <preference for="Magefan\Blog\Api\PostManagementInterface" type="Magefan\Blog\Model\PostManagement" />
  12. <preference for="Magefan\Blog\Api\CategoryManagementInterface" type="Magefan\Blog\Model\CategoryManagement" />
  13. <!-- deprecated <preference for="Magento\Sitemap\Model\Sitemap" type="Magefan\Blog\Model\Sitemap" /> -->
  14. <virtualType name="Magefan\Blog\ImageUpload" type="Magento\Catalog\Model\ImageUploader">
  15. <arguments>
  16. <argument name="baseTmpPath" xsi:type="string">magefan_blog/tmp</argument>
  17. <argument name="basePath" xsi:type="string">magefan_blog</argument>
  18. <argument name="allowedExtensions" xsi:type="array">
  19. <item name="jpg" xsi:type="string">jpg</item>
  20. <item name="jpeg" xsi:type="string">jpeg</item>
  21. <item name="gif" xsi:type="string">gif</item>
  22. <item name="png" xsi:type="string">png</item>
  23. </argument>
  24. </arguments>
  25. </virtualType>
  26. <type name="Magefan\Blog\Controller\Adminhtml\Post\Upload\FeaturedImg">
  27. <arguments>
  28. <argument name="imageUploader" xsi:type="object">Magefan\Blog\ImageUpload</argument>
  29. </arguments>
  30. </type>
  31. <type name="Magefan\Blog\Controller\Adminhtml\Post\Upload\OgImg">
  32. <arguments>
  33. <argument name="imageUploader" xsi:type="object">Magefan\Blog\ImageUpload</argument>
  34. </arguments>
  35. </type>
  36. <type name="Magefan\Blog\Controller\Adminhtml\Post\Upload\Gallery">
  37. <arguments>
  38. <argument name="imageUploader" xsi:type="object">Magefan\Blog\ImageUpload</argument>
  39. </arguments>
  40. </type>
  41. <type name="Plumrocket\Amp\Helper\Data">
  42. <plugin name="plumrocket_amp_helper_data_magefan_blog"
  43. type="Magefan\Blog\Plugin\Plumrocket\Amp\HelperDataPlugin" sortOrder="10"/>
  44. </type>
  45. <type name="Plumrocket\Amp\Model\System\Config\Source\Page">
  46. <plugin name="plumrocket_amp_source_page_magefan_blog"
  47. type="Magefan\Blog\Plugin\Plumrocket\Amp\SourcePagePlugin" sortOrder="10"/>
  48. </type>
  49. <type name="Magento\Sitemap\Model\Sitemap">
  50. <plugin name="magento_sitemap_model_sitemap_magefan_blog"
  51. type="Magefan\Blog\Plugin\Magento\Sitemap\SitemapPlugin" sortOrder="10"/>
  52. </type>
  53. </config>