attiquer
12/4/2015 - 3:16 PM

Magento get category methods

Magento get category methods

<?php $cat = $this->helper(catalog/output);
$class_n = get_class($cat);
$methods_n = get_class_methods($class_n); 
foreach($methods_n as $method){
echo $method . '<br />';
}
//or
print_r(get_class_methods($class_n));
?>

//helper methods / reflection functions
<?php $_productCollection = Mage::getResourceModel('catalog/product_collection'); ?>
<?php $_categoryCollection = Mage::getResourceModel('catalog/category_collection'); ?>
<?php var_dump(get_class($_productCollection)); ?>
<?php var_dump(get_class($_categoryCollection)); ?>
<?php print_r(get_class_methods($_productCollection)); ?>

<?php //ResourceModel ?>
<?php $_productCollection = Mage::getResourceModel('catalog/product_collection'); ?>
<?php $_categoryCollection = Mage::getResourceModel('catalog/category_collection'); ?>
<?php var_dump(get_class($_productCollection)); ?>
<?php var_dump(get_class($_categoryCollection)); ?>
<?php // print_r(get_class_methods($_productCollection)); ?>

<?php //Model ?>
<?php $_productModel = Mage::getModel('catalog/product'); ?>
<?php var_dump(get_class($_productModel)); ?>
<?php // var_dump(get_class_methods($_productModel)); ?>
<?php $_categoryModel = Mage::getModel('catalog/category'); ?>
<?php var_dump(get_class($_categoryModel)); ?>

<?php //Helper ?>
<?php $_helper    = $this->helper('catalog/output'); ?>
<?php var_dump(get_class($_helper)); ?>