コード例 #1
0
ファイル: Save.php プロジェクト: aiesh/magento2
 /**
  * Get category instance applicable for generatePath
  *
  * @param \Magento\UrlRewrite\Model\UrlRewrite $model
  * @return Category|null
  */
 protected function _getInitializedCategory($model)
 {
     /** @var $category Category */
     $category = $this->_getCategory();
     if ($category->getId()) {
         $model->setCategoryId($category->getId());
     } else {
         $category = null;
     }
     return $category;
 }