Create Checklist Items

  1. Create a new class that inherits from SysCheckListItem class.

  2. Implement an interface for a setup checklist by using the SysCheckListInterfaceSetup class, or implement an interface for an upgrade checklist by using the SysCheckListInterfaceUpgrade class.

  3. Override the following methods:

  4. Set the security key for the menu items to limit access to certain users based on user permissions, by using the Menu::securityKey method.

  5. Add a dependency for a menu item by using the SysCheckListItem::addDependency method.

  6. Run the following code when the check list tasks are completed.

    SysCheckList::finished(classnum(SysCheckListItem_MyNewItem))
    
  7. Add the ID for the class you created in step 1 to the SysCheckList:checklistItems static method.

  8. If a menu item requires restarting the system, call SysCheckList::needRestart in the SysCheckListItem::setStatus method as shown in the following example.

    if (status == SysCheckListStatus::finished &&   !this.find())
    {
        this.save();
        SysCheckList.needRestart(true);
    }
    

The following code shows a call to the SysCheckListItem::placeAfter method that sets the sequence in the list and a call to the SysCheckListItem::indeterminate method that indicates that a menu item can be skipped. When a user clicks the item, the status changes to finished.

The placeAfter method is dependent on the SysCheckList::sortWithStatusPreference method.

super();
this.indeterminate(true); // You can skip this item
this.placeAfter(classnum(SysCheckListItem_Synchronize));
 
// Can only run after sync
this.addDependency(classnum(SysCheckListItem_Synchronize));   
 
// Can only run after compile or licensecode
this.addDependency( [classnum(SysCheckListItem_Compile),   classnum(SysCheckListItem_LicenseCode)} ); 

Community Additions

ADD
Show: