common/models/base/ModelMapper.php
public static function disableByParent( $parentId, $parentType ) {

		$tableName = static::tableName();

		// Disable all mappings
		$query		= "UPDATE $tableName SET `active`=0 WHERE `parentType`='$parentType' AND `parentId`=$parentId";
		$command	= Yii::$app->db->createCommand( $query );

		$command->execute();
	}
public static function disableByParent( $parentId, $parentType ) {

		$tableName = static::tableName();

		// Disable all mappings
		$query		= "UPDATE $tableName SET `active`=0 WHERE `parentType`='$parentType' AND `parentId`=$parentId";
		$command	= Yii::$app->db->createCommand( $query );

		$command->execute();
	}
public static function disableByParent ( $ parentId , $ parentType ) { $ tableName = static :: tableName ( ) ; // Disable all mappings $ query = "UPDATE $tableName SET `active`=0 WHERE `parentType`='$parentType' AND `parentId`=$parentId" ; $ command = Yii :: $ app -> db -> createCommand ( $ query ) ; $ command -> execute ( ) ; }
Disable all the mappings for given parent id and parent type.

@param integer $parentId
@param string $parentType
@return integer number of rows.
@throws Exception in case query failed.
Disable all the mappings for given parent id and parent type .