This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* News Item block | |
* | |
* @author Magento | |
*/ | |
class Magentostudy_News_Block_Item extends Mage_Core_Block_Template | |
{ | |
/** | |
* Current news item instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* News List block | |
* | |
* @author Magento | |
*/ | |
class Magentostudy_News_Block_List extends Mage_Core_Block_Template | |
{ | |
/** | |
* News collection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Magento frontend layout | |
* | |
* @author Magento | |
*/ | |
--> | |
<layout version="0.1.0"> | |
<default> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* News frontend controller | |
* | |
* @author Magento | |
*/ | |
class Magentostudy_News_IndexController extends Mage_Core_Controller_Front_Action | |
{ | |
/** | |
* Pre dispatch action that allows to redirect to no route page in case of disabled extension through admin panel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* News collection | |
* | |
* @author Magento | |
*/ | |
class Magentostudy_News_Model_Resource_News_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract | |
{ | |
/** | |
* Define collection model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* News item resource model | |
* | |
* @author Magento | |
*/ | |
class Magentostudy_News_Model_Resource_News extends Mage_Core_Model_Resource_Db_Abstract | |
{ | |
/** | |
* Initialize connection and define main table and primary key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<config> | |
<modules> | |
<!-- omitted for brevity --> | |
</modules> | |
<global> | |
<models> | |
<magentostudy_news> | |
<class>Magentostudy_News_Model</class> | |
<resourceModel>news_resource</resourceModel> <!-- Resource model name --> | |
</magentostudy_news> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* News installation script | |
* | |
* @author Magento | |
*/ | |
/** | |
* @var $installer Mage_Core_Model_Resource_Setup | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Module configuration | |
* | |
* @author Magento | |
*/ | |
--> | |
<config> | |
<modules> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Module configuration | |
* | |
* @author Magento | |
*/ | |
--> | |
<config> | |
<modules> |