コード例 #1
0
 public static function initFields()
 {
     if (self::$infoFields === NULL) {
         self::$infoFields = array('name' => 'Name', 'description' => 'Description', 'version' => 'Version', 'author' => 'Author', 'url' => 'URL', 'original-author' => 'Original Author', 'notes' => 'Notes', 'maintainer' => 'Maintainer', 'maintainer-url' => 'Maintainer URL');
         self::$infoFieldsInverse = CrayonUtil::array_flip(self::$infoFields);
         // A map of CSS element name and property to name
         self::$attributes = array();
         // A map of CSS attribute to input type
         self::$attributeGroups = array('color' => array('background', 'background-color', 'border-color', 'color', 'border-top-color', 'border-bottom-color', 'border-left-color', 'border-right-color'), 'size' => array('border-width'), 'border-style' => array('border-style', 'border-bottom-style', 'border-top-style', 'border-left-style', 'border-right-style'));
         self::$attributeGroupsInverse = CrayonUtil::array_flip(self::$attributeGroups);
         // Mapping of input type to attribute group
         self::$attributeTypes = array('select' => array('border-style', 'font-style', 'font-weight', 'text-decoration'));
         self::$attributeTypesInverse = CrayonUtil::array_flip(self::$attributeTypes);
     }
 }