Porting a package

Permalink 2 users found helpful
Modified the Cobalt controller.php as follows:

namespace Concrete\Package\Cobalt;
defined('C5_EXECUTE') or die(_("Access Denied."));
use PageTheme;
use PageType;
use PageTemplate;
class Controller extends \Concrete\Core\Package\Package {
   protected $pkgHandle = 'cobalt';
   protected $appVersionRequired = '5.7.0';
   protected $pkgVersion = '2.0';
   public function getPackageDescription() {
      return t("Cobalt is a responsive business theme for C5 that integrates Foundation Framework CSS.");
   }
   public function getPackageName() {
      return t("Cobalt");
   }


On installation I receive a complaint about a null ptName:

An exception occurred while executing 'insert into PageTypes (ptName, ptHandle, ptDefaultPageTemplateID, ptAllowedPageTemplates, ptIsInternal, ptLaunchInComposer, ptDisplayOrder, ptIsFrequentlyAdded, pkgID) values (?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [null, null, 0, "A", 0, 0, "1", 0, "7"]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'ptName' cannot be null

 
fischershaw replied on at Permalink Reply
Never mind. Apparently they are now called "handle" and "name"