![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magefan/module-blog/Block/Widget/ |
<?php /** * Copyright © Magefan ([email protected]). All rights reserved. * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement). * * Glory to Ukraine! Glory to the heroes! */ namespace Magefan\Blog\Block\Widget; /** * Blog featured posts widget */ class Featured extends \Magefan\Blog\Block\Sidebar\Featured implements \Magento\Widget\Block\BlockInterface { /** * Set blog template * * @return this */ public function _toHtml() { $this->setTemplate( $this->getData('custom_template') ?: 'Magefan_Blog::widget/recent.phtml' ); return \Magento\Framework\View\Element\Template::_toHtml(); } /** * Retrieve block title * * @return string */ public function getTitle() { return $this->getData('title') ?: ''; } /** * Retrieve post ids string * * @return string */ protected function getPostIdsConfigValue() { return (string)$this->getData('posts_ids'); } /** * Retrieve post short content * * @param \Magefan\Blog\Model\Post $post * @param mixed $len * @param mixed $endCharacters * @return string */ public function getShorContent($post, $len = null, $endCharacters = null) { return $post->getShortFilteredContent($len, $endCharacters); } /** * Get relevant path to template * Skip parent one as it use template for sidebar block * * @return string */ public function getTemplate() { return \Magefan\Blog\Block\Post\PostList\AbstractList::getTemplate(); } }