Skip to content
Permalink
5b785da3cb
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
98 lines (90 sloc) 2.87 KB
<?php
/**
* COmanage Registry Grouper Lite Widget Dashboard Widget
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* UCAID licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @link http://www.internet2.edu/comanage COmanage Project
* @package registry-plugin
* @since COmanage Registry v3.2.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/
App::uses("CoDashboardWidgetBackend", "Model");
class CoGrouperLite extends CoDashboardWidgetBackend {
// Define class name for cake
public $name = "CoGrouperLite";
// Association rules from this model to other models
public $belongsTo = array(
"CoDashboardWidget"
);
// Add behaviors
public $actsAs = array('Containable');
public $hasMany = array(
);
/*
Not sure if will use
public $duplicatableModels = array(
"CoGrouperLite" => array(
"parent" => "CoDashboardWidget",
"fk" => "co_dashboard_widget_id"
)
);*/
// Validation rules for table elements
//Tried adding rule to each field to make alphaNumeric, but keeps throwing errors. will research.
public $validate = array(
'co_dashboard_widget_id' => array(
'rule' => 'alphaNumeric',
'required' => true
),
'conn_url' => array(
'rule' => array('custom', '/^https?:\/\/.*/'),
'required' => true
),
'conn_ver' => array(
'rule' => array('minLength', 4),
'required' => true
),
'grouper_url' => array(
'rule' => array('custom', '/^https?:\/\/.*/'),
'required' => true
),
'conn_user' => array(
'rule' => array('minLength', 1),
'required' => true
),
'conn_pass' => array(
'rule' => array('minLength', 1),
'required' => true
),
'adhoc_heading' => array(
'rule' => array('minLength', 1),
'required' => false,
'default' => 'Ad-hoc groups'
),
'wg_heading' => array(
'rule' => array('minLength', 1),
'required' => false,
'default' => 'Working groups'
),
'default_collapse' => array(
'rule' => array('minLength', 1),
'required' => false,
'default' => 'collapsed'
),
);
}