Skip to content

Commit

Permalink
Merge pull request #312 from mageplaza/2.3-develop
Browse files Browse the repository at this point in the history
2.3 develop
  • Loading branch information
Shinichi69 authored May 11, 2021
2 parents 416c762 + 2a5e46f commit cfe8d1b
Show file tree
Hide file tree
Showing 33 changed files with 1,668 additions and 569 deletions.
23 changes: 23 additions & 0 deletions Api/BlogRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,26 @@ interface BlogRepositoryInterface
*/
public function getAllPost();

/**
* @return \Mageplaza\Blog\Api\Data\MonthlyArchiveInterface[]
* @throws NoSuchEntityException
* @throws Exception
*/
public function getMonthlyArchive();

/**
* @param string $monthly
* @param string $year
*
* @return \Mageplaza\Blog\Api\Data\PostInterface[]
*/
public function getPostMonthlyArchive($monthly, $year);

/**
* @param string $postId
*
* @return \Mageplaza\Blog\Api\Data\PostInterface
* @throws Exception
*/
public function getPostView($postId);

Expand Down Expand Up @@ -381,4 +397,11 @@ public function deleteAuthor($authorId);
* @throws Exception
*/
public function updateAuthor($authorId, $author);

/**
* @return \Mageplaza\Blog\Api\Data\BlogConfigInterface
*
* @throws InputException
*/
public function getConfig();
}
2 changes: 1 addition & 1 deletion Api/Data/AuthorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function getCustomerId();
*
* @return $this
*/
public function setCustomerIdId($id);
public function setCustomerId($id);

/**
* @return int|null
Expand Down
69 changes: 69 additions & 0 deletions Api/Data/BlogConfigInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_Blog
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/

namespace Mageplaza\Blog\Api\Data;

/**
* Interface BlogConfigInterface
* @package Mageplaza\Blog\Api\Data
*/
interface BlogConfigInterface
{
const GENERAL = 'general';
const SIDEBAR = 'sidebar';
const SEO = 'seo';

/**
* @return \Mageplaza\Blog\Api\Data\Config\GeneralInterface
*/
public function getGeneral();

/**
* @param \Mageplaza\Blog\Api\Data\Config\GeneralInterface $value
*
* @return $this
*/
public function setGeneral($value);

/**
* @return \Mageplaza\Blog\Api\Data\Config\SidebarInterface
*/
public function getSidebar();

/**
* @param \Mageplaza\Blog\Api\Data\Config\SidebarInterface $value
*
* @return $this
*/
public function setSidebar($value);

/**
* @return \Mageplaza\Blog\Api\Data\Config\SeoInterface
*/
public function getSeo();

/**
* @param \Mageplaza\Blog\Api\Data\Config\SeoInterface $value
*
* @return $this
*/
public function setSeo($value);
}
95 changes: 95 additions & 0 deletions Api/Data/Config/GeneralInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_Blog
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/

namespace Mageplaza\Blog\Api\Data\Config;

/**
* Interface GeneralInterface
* @package Mageplaza\Blog\Api\Data\Config
*/
interface GeneralInterface
{
const BLOG_NAME = 'blog_name';
const IS_LINK_IN_MENU = 'is_link_in_menu';
const IS_DISPLAY_AUTHOR = 'is_display_author';
const BLOG_MODE = 'blog_mode';
const BLOG_COLOR = 'blog_color';

/**
* @return string/null
*/
public function getBlogName();

/**
* @param string $value
*
* @return $this
*/
public function setBlogName($value);

/**
* @return boolean/null
*/
public function getIsLinkInMenu();

/**
* @param boolean $value
*
* @return $this
*/
public function setIsLinkInMenu($value);

/**
* @return boolean/null
*/
public function getIsDisplayAuthor();

/**
* @param boolean $value
*
* @return $this
*/
public function setIsDisplayAuthor($value);

/**
* @return string/null
*/
public function getBlogMode();

/**
* @param string $value
*
* @return $this
*/
public function setBlogMode($value);

/**
* @return string/null
*/
public function getBlogColor();

/**
* @param string $value
*
* @return $this
*/
public function setBlogColor($value);
}
56 changes: 56 additions & 0 deletions Api/Data/Config/SeoInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_Blog
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/

namespace Mageplaza\Blog\Api\Data\Config;

/**
* Interface SeoInterface
* @package Mageplaza\Blog\Api\Data\Config
*/
interface SeoInterface
{
const META_TITLE = 'meta_title';
const META_DESCRIPTION = 'meta_description';

/**
* @return string/null
*/
public function getMetaTitle();

/**
* @param string $value
*
* @return $this
*/
public function setMetaTitle($value);

/**
* @return string/null
*/
public function getMetaDescription();

/**
* @param string $value
*
* @return $this
*/
public function setMetaDescription($value);
}
56 changes: 56 additions & 0 deletions Api/Data/Config/SidebarInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_Blog
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/

namespace Mageplaza\Blog\Api\Data\Config;

/**
* Interface SidebarInterface
* @package Mageplaza\Blog\Api\Data\Config
*/
interface SidebarInterface
{
const NUMBER_RECENT = 'number_recent';
const NUMBER_MOST_VIEW = 'number_most_view';

/**
* @return string/null
*/
public function getNumberRecent();

/**
* @param string $value
*
* @return $this
*/
public function setNumberRecent($value);

/**
* @return string/null
*/
public function getNumberMostView();

/**
* @param string $value
*
* @return $this
*/
public function setNumberMostView($value);
}
69 changes: 69 additions & 0 deletions Api/Data/MonthlyArchiveInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_Blog
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/

namespace Mageplaza\Blog\Api\Data;

/**
* Interface MonthlyArchiveInterface
* @package Mageplaza\Blog\Api\Data
*/
interface MonthlyArchiveInterface
{
const LABEL = 'label';
const POST_COUNT = 'post_count';
const LINK = 'link';

/**
* @return string
*/
public function getLabel();

/**
* @param string $value
*
* @return $this
*/
public function setLabel($value);

/**
* @return int
*/
public function getPostCount();

/**
* @param int $value
*
* @return $this
*/
public function setPostCount($value);

/**
* @return string
*/
public function getLink();

/**
* @param string $value
*
* @return $this
*/
public function setLink($value);
}
Loading

0 comments on commit cfe8d1b

Please sign in to comment.