Skip to content

Commit

Permalink
Version 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrzk committed Aug 31, 2022
1 parent 941c4e6 commit ca653f6
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
12 changes: 12 additions & 0 deletions Api/Data/QuestionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ public function getPosition(): int;
*/
public function setPosition(?int $position): QuestionInterface;

/**
* @return array
*/
public function getStoreIds(): array;

/**
* @param array $storeIds
*
* @return QuestionInterface
*/
public function setStoreIds(array $storeIds): QuestionInterface;

/**
* @return bool
*/
Expand Down
32 changes: 30 additions & 2 deletions Model/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,41 @@ public function setAnswer(?string $answer): QuestionInterface
return $this->setData(self::ANSWER, $answer);
}

/**
* @return bool
*/
public function isActive(): bool
{
// TODO: Implement isActive() method.
return (bool) $this->_getData(self::ACTIVE);
}

/**
* @param bool $active
*
* @return QuestionInterface
*/
public function setActive(bool $active): QuestionInterface
{
// TODO: Implement setActive() method.
return $this->setData(self::ACTIVE, $active);
}

/**
* @return array
*/
public function getStoreIds(): array
{
return (array) explode(",", $this->_getData(selfSTORE_IDSACTIVE));
}

/**
* @param array $storeIds
*
* @return QuestionInterface
*/
public function setStoreIds(array $storeIds): QuestionInterface
{
$storeIds = implode(",", $storeIds);

return $this->setData(self::STORE_IDS, $storeIds);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
],
"description": "Magento 2 module for manage FaqPage",
"type": "magento2-module",
"version": "1.0.2",
"version": "1.0.3",
"require": {
"php": ">=7.4",
"magento/framework": "*"
Expand Down

0 comments on commit ca653f6

Please sign in to comment.