View Single Post
  #3  
Old 01-11-2019, 01:50 PM
 
greevesh greevesh is offline
 

Newbie
  
Join Date: Jan 2019
Posts: 2
 

Default Re: Following the "Create a module" Tutorial (for devs)

Not sure why I didn't hand out the code in the first place

PHP Code:
<?php

namespace XLite\Module\GreevesH\FirstModule;

abstract class 
Main extends \XLite\Module\AModule
{
    
/**
     * Harrison Greeves
     *
     * @return string
     */

    // static methods can be used before instantiating the object it resides in
    
public static function getAuthorName()
    {
        return 
'Harrison Greeves';
    }

    
/**
     * FirstModule
     *
     * @return string
     */
    
public static function getModuleName()
    {
        return 
'FirstModule';
    }

    
/**
     * Get module major version
     *
     * @return string
     */
    
public static function getMajorVersion()
    {
        return 
'5.3';
    }

    
/**
     * Module version
     *
     * @return string
     */
    
public static function getMinorVersion()
    {
        return 
0;
    }

    
/**
     * Module description
     *
     * @return string
     */
    
public static function getDescription()
    {
        return 
'This is my first ever module written with X-Cart.';
    }
}
__________________
HGreeves
Reply With Quote