<?php
/*** COPYRIGHT NOTICE *********************************************************
*
* Copyright 2009-2017 ProjeQtOr - Pascal BERNARD -
This email address is being protected from spambots. You need JavaScript enabled to view it.
* Contributors : -
*
* This file is part of ProjeQtOr.
*
* ProjeQtOr is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* ProjeQtOr is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU Affero General Public License along with
* ProjeQtOr. If not, see <
www.gnu.org/licenses/>.
*
* You can get complete code of ProjeQtOr, other resource, help and information
* about contributors at
www.projeqtor.org
*
*** DO NOT REMOVE THIS NOTICE ************************************************/
/** ============================================================================
* Opportunity.
*/
require_once('_securityCheck.php');
class Opportunity extends OpportunityMain {
public $_sec_description;
public $id;
public $reference;
public $produit;
public $name;
public $idOpportunityType;
public $idProject;
public $creationDate;
public $idUser;
public $idSeverity;
public $idLikelihood;
public $idCriticality;
public $impactCost;
public $projectReserveAmount;
public $Origin;
public $cause;
public $impact;
public $description;
public $_sec_treatment;
public $idStatus;
public $idResource;
public $idPriority;
public $initialEndDate;
public $actualEndDate;
public $handled;
public $handledDate;
public $done;
public $doneDate;
public $idle;
public $idleDate;
public $cancelled;
public $_lib_cancelled;
public $result;
public $_sec_Link;
public $_nbColMax=3;
public static $_customFields=array(
'produit'
);
private static $_fieldsAttributes=array(
"id"=>"nobr",
"reference"=>"readonly",
"name"=>"required",
"idProject"=>"required",
"idStatus"=>"required",
"idOpportunityType"=>"required",
"creationDate"=>"required",
"handled"=>"nobr",
"done"=>"nobr",
"idle"=>"nobr",
"idleDate"=>"nobr",
"cancelled"=>"nobr",
"projectReserveAmount"=>"readonly",
"produit"=>""
);
private static $_staticDisplayStyling=array(
);
private static $_colCaptionTransposition=array(
"produit"=>"plgProduit"
);
public static $_defaultValues=array(
);
/** ==========================================================================
* Constructor
* @param $id the id of the object in the database (null if not stored yet)
* @return void
*/
function __construct($id = NULL, $withoutDependentObjects=false) {
parent::__construct($id,$withoutDependentObjects);
}
/** ==========================================================================
* Destructor
* @return void
*/
function __destruct() {
parent::__destruct();
}
/** ==========================================================================
* Return the specific fieldsAttributes
* @return the fieldsAttributes
*/
protected function getStaticFieldsAttributes() {
return array_merge(parent::getStaticFieldsAttributes(),self::$_fieldsAttributes);
}
/** ==========================================================================
* Return the specific styling for fields
* @return the fields styling
*/
public function getStaticDisplayStyling() {
return self::$_staticDisplayStyling;
}
/** ============================================================================
* Set attribut from parent : merge current attributes with those of Main class
* @return void
*/
public function setAttributes() {
$parentClass=get_class($this)."Main";
if (!SqlElement::class_exists($parentClass)) return;
$parent=new $parentClass($this->id);
if (! method_exists($parent, "setAttributes")) return;
$parent->setAttributes();
if (method_exists("SqlElement","mergeAttributesArrays")) {
self::$_fieldsAttributes=SqlElement::mergeAttributesArrays(self::$_fieldsAttributes,$parent->getStaticFieldsAttributes());
} else {
self::$_fieldsAttributes=array_merge_preserve_keys(self::$_fieldsAttributes,$parent->getStaticFieldsAttributes());
}
} /** ============================================================================
* Return the specific colCaptionTransposition
* @return the colCaptionTransposition
*/
protected function getStaticColCaptionTransposition($fld=null) {
if (isset(self::$_colCaptionTransposition)) {
return array_merge(parent::getStaticColCaptionTransposition($fld),self::$_colCaptionTransposition);
} else {
return parent::getStaticColCaptionTransposition($fld);
}
}
/** ==========================================================================
* Return the generic defaultValues
* @return the layout
*/
protected function getStaticDefaultValues() {
return self::$_defaultValues;
}
}
?>