Quellcode durchsuchen

Updating of tripal_stock increasing views capabilities

laceysanderson vor 14 Jahren
Ursprung
Commit
ad758e6bda

+ 60 - 50
tripal_core/tripal_core.views.inc

@@ -45,17 +45,19 @@ function tripal_core_add_node_ids_to_view (&$view) {
 		$unique_analysis_ids = array_filter($analysis_ids);
 		$unique_analysis_ids = array_unique($unique_analysis_ids);
 
-		// Using the list of analysis_ids from the view
-		// lookup the NIDs from drupal
-		// and add that to the results of the view
-		$sql = "SELECT nid, analysis_id FROM {chado_analysis} WHERE analysis_id IN (".implode(',',$unique_analysis_ids).")";
-		$resource = db_query($sql);
-		while ($r = db_fetch_object($resource)) {
-			$keys = array_keys($analysis_ids, $r->analysis_id);
-			foreach ($keys as $k) {
-				$view->result[$k]->analysis_nid = $r->nid;
+		if (!empty($unique_analysis_ids)) {
+			// Using the list of analysis_ids from the view
+			// lookup the NIDs from drupal
+			// and add that to the results of the view
+			$sql = "SELECT nid, analysis_id FROM {chado_analysis} WHERE analysis_id IN (".implode(',',$unique_analysis_ids).")";
+			$resource = db_query($sql);
+			while ($r = db_fetch_object($resource)) {
+				$keys = array_keys($analysis_ids, $r->analysis_id);
+				foreach ($keys as $k) {
+					$view->result[$k]->analysis_nid = $r->nid;
+				}
 			}
-		}
+		} // if there are any analysis'
 	} //end of case for analysis NID
 	
 	//-----Feature-----------------------------------------------
@@ -74,17 +76,19 @@ function tripal_core_add_node_ids_to_view (&$view) {
 		$unique_feature_ids = array_filter($feature_ids);
 		$unique_feature_ids = array_unique($unique_feature_ids);
 
-		// Using the list of feature_ids from the view
-		// lookup the NIDs from drupal
-		// and add that to the results of the view
-		$sql = "SELECT nid, feature_id FROM {chado_feature} WHERE feature_id IN (".implode(',',$unique_feature_ids).")";
-		$resource = db_query($sql);
-		while ($r = db_fetch_object($resource)) {
-			$keys = array_keys($feature_ids, $r->feature_id);
-			foreach ($keys as $k) {
-				$view->result[$k]->feature_nid = $r->nid;
+		if (!empty($unique_feature_ids)) {
+			// Using the list of feature_ids from the view
+			// lookup the NIDs from drupal
+			// and add that to the results of the view
+			$sql = "SELECT nid, feature_id FROM {chado_feature} WHERE feature_id IN (".implode(',',$unique_feature_ids).")";
+			$resource = db_query($sql);
+			while ($r = db_fetch_object($resource)) {
+				$keys = array_keys($feature_ids, $r->feature_id);
+				foreach ($keys as $k) {
+					$view->result[$k]->feature_nid = $r->nid;
+				}
 			}
-		}
+		} // if there are any features
 	} //end of case for feature NID
 	
 	//-----Library-----------------------------------------------
@@ -103,17 +107,19 @@ function tripal_core_add_node_ids_to_view (&$view) {
 		$unique_library_ids = array_filter($library_ids);
 		$unique_library_ids = array_unique($unique_library_ids);
 
-		// Using the list of library_ids from the view
-		// lookup the NIDs from drupal
-		// and add that to the results of the view
-		$sql = "SELECT nid, library_id FROM {chado_library} WHERE library_id IN (".implode(',',$unique_library_ids).")";
-		$resource = db_query($sql);
-		while ($r = db_fetch_object($resource)) {
-			$keys = array_keys($library_ids, $r->library_id);
-			foreach ($keys as $k) {
-				$view->result[$k]->library_nid = $r->nid;
+		if (!empty($unique_library_ids)) {
+			// Using the list of library_ids from the view
+			// lookup the NIDs from drupal
+			// and add that to the results of the view
+			$sql = "SELECT nid, library_id FROM {chado_library} WHERE library_id IN (".implode(',',$unique_library_ids).")";
+			$resource = db_query($sql);
+			while ($r = db_fetch_object($resource)) {
+				$keys = array_keys($library_ids, $r->library_id);
+				foreach ($keys as $k) {
+					$view->result[$k]->library_nid = $r->nid;
+				}
 			}
-		}
+		} // if there are libraries
 	} //end of case for library NID
 	
 	//-----Organism----------------------------------------------
@@ -132,17 +138,19 @@ function tripal_core_add_node_ids_to_view (&$view) {
 		$unique_organism_ids = array_filter($organism_ids);
 		$unique_organism_ids = array_unique($unique_organism_ids);
 
-		// Using the list of organism_ids from the view
-		// lookup the NIDs from drupal
-		// and add that to the results of the view
-		$sql = "SELECT nid, organism_id FROM {chado_organism} WHERE organism_id IN (".implode(',',$unique_organism_ids).")";
-		$resource = db_query($sql);
-		while ($r = db_fetch_object($resource)) {
-			$keys = array_keys($organism_ids, $r->organism_id);
-			foreach ($keys as $k) {
-				$view->result[$k]->organism_nid = $r->nid;
+		if (!empty($unique_organism_ids)) {
+			// Using the list of organism_ids from the view
+			// lookup the NIDs from drupal
+			// and add that to the results of the view
+			$sql = "SELECT nid, organism_id FROM {chado_organism} WHERE organism_id IN (".implode(',',$unique_organism_ids).")";
+			$resource = db_query($sql);
+			while ($r = db_fetch_object($resource)) {
+				$keys = array_keys($organism_ids, $r->organism_id);
+				foreach ($keys as $k) {
+					$view->result[$k]->organism_nid = $r->nid;
+				}
 			}
-		}
+		} // if there are organisms
 	} //end of case for organism NID
 	
 	//-----Stock-------------------------------------------------
@@ -161,17 +169,19 @@ function tripal_core_add_node_ids_to_view (&$view) {
 		$unique_stock_ids = array_filter($stock_ids);
 		$unique_stock_ids = array_unique($unique_stock_ids);
 
-		// Using the list of stock_ids from the view
-		// lookup the NIDs from drupal
-		// and add that to the results of the view
-		$sql = "SELECT nid, stock_id FROM {chado_stock} WHERE stock_id IN (".implode(',',$unique_stock_ids).")";
-		$resource = db_query($sql);
-		while ($r = db_fetch_object($resource)) {
-			$keys = array_keys($stock_ids, $r->stock_id);
-			foreach ($keys as $k) {
-				$view->result[$k]->stock_nid = $r->nid;
+		if (!empty($unique_stock_ids)) {
+			// Using the list of stock_ids from the view
+			// lookup the NIDs from drupal
+			// and add that to the results of the view
+			$sql = "SELECT nid, stock_id FROM {chado_stock} WHERE stock_id IN (".implode(',',$unique_stock_ids).")";
+			$resource = db_query($sql);
+			while ($r = db_fetch_object($resource)) {
+				$keys = array_keys($stock_ids, $r->stock_id);
+				foreach ($keys as $k) {
+					$view->result[$k]->stock_nid = $r->nid;
+				}
 			}
-		}
+		} //if there are stocks
 	} //end of case for stock NID
 		
 	return $view;

+ 61 - 61
tripal_core/views/handlers/views_handler_field_stockprop_by_type.inc

@@ -22,22 +22,22 @@ class views_handler_field_stockprop_by_type extends views_handler_field_prerende
   function options_form(&$form, &$form_state) {
     parent::options_form($form, $form_state);
 
-		$form['stockprop_display_options'] = array(
-		  '#prefix' => '<div><div id="edit-options-display_options">',
+    $form['stockprop_display_options'] = array(
+      '#prefix' => '<div><div id="edit-options-display_options">',
       '#suffix' => '</div></div>',
-			'#type' => 'checkboxes',
-			'#title' => t('Display Relationship Parts'),
-			'#description' => t('Check each part of the property you want displayed where the parts '
-				.'of a property are: <type> and <value>. '
-				.'For example, with the property temperature 54 degrees Celcius the type=temperature and the value=54 degrees Celcius. '
-				.'Thus, if you checked only value then "54 degrees Celcius" would be displayed.'),
-			'#options' => array(
-				'type' => 'Type',
-				'value' => 'Value',
-			),
-			'#default_value' => array($this->options['stockprop_display_options']['type'], $this->options['stockprop_display_options']['value']),
-		);
-		
+      '#type' => 'checkboxes',
+      '#title' => t('Display Relationship Parts'),
+      '#description' => t('Check each part of the property you want displayed where the parts '
+        .'of a property are: <type> and <value>. '
+        .'For example, with the property temperature 54 degrees Celcius the type=temperature and the value=54 degrees Celcius. '
+        .'Thus, if you checked only value then "54 degrees Celcius" would be displayed.'),
+      '#options' => array(
+        'type' => 'Type',
+        'value' => 'Value',
+      ),
+      '#default_value' => array($this->options['stockprop_display_options']['type'], $this->options['stockprop_display_options']['value']),
+    );
+    
     $options = get_chado_cvterm_options( variable_get('chado_stock_prop_types_cv', 'null') );
     $form['stockprop_type_ids'] = array(
       '#prefix' => '<div><div id="edit-options-stockprop_type_ids">',
@@ -48,7 +48,7 @@ class views_handler_field_stockprop_by_type extends views_handler_field_prerende
       '#default_value' => $this->options['stockprop_type_ids'],
     );
   }
-
+  
   /**
    * Add this term to the query
    */
@@ -56,59 +56,59 @@ class views_handler_field_stockprop_by_type extends views_handler_field_prerende
     $this->add_additional_fields();
   }
 
-	function pre_render($values) {
-		$this->aliases['properties'] = 'properties';
-		$this->aliases['stock_id'] = 'stock_id';
-		$this->field_alias = $this->aliases['stock_id'];
-		
-		//for each stock in this view page
-		foreach ($values as $result) {
-			if (!empty($result->{$this->aliases['properties']})) {
-				
-				// all properties for the current stock
-				$properties = $result->{$this->aliases['properties']};
-				foreach ($properties as $property) {
-					// perform filtering
-					if (!empty($this->options['stockprop_type_ids'])) {
-						$types2keep = array_filter($this->options['stockprop_type_ids']);
-						if (!in_array($property->type_id, $types2keep)) {
-							continue;
-						}
-					}
-					
-					// Add property to the list of items to be rendered
-					$this->items[$property->stock_id][$property->stockprop_id]['stock_id'] = $property->stock_id;
-					$this->items[$property->stock_id][$property->stockprop_id]['stockprop_id'] = $property->stockprop_id;
-					$this->items[$property->stock_id][$property->stockprop_id]['type_id'] = $property->type_id;
-					$this->items[$property->stock_id][$property->stockprop_id]['type_name'] = check_plain($property->type_name);
-					$this->items[$property->stock_id][$property->stockprop_id]['value'] = check_plain($property->value);
-					$this->items[$property->stock_id][$property->stockprop_id]['rank'] = $property->rank;
-				}
-			}
-		}
-	}
+  function pre_render($values) {
+    $this->aliases['properties'] = 'properties';
+    $this->aliases['stock_id'] = 'stock_id';
+    $this->field_alias = $this->aliases['stock_id'];
+    
+    //for each stock in this view page
+    foreach ($values as $result) {
+      if (!empty($result->{$this->aliases['properties']})) {
+        
+        // all properties for the current stock
+        $properties = $result->{$this->aliases['properties']};
+        foreach ($properties as $property) {
+          // perform filtering
+          if (!empty($this->options['stockprop_type_ids'])) {
+            $types2keep = array_filter($this->options['stockprop_type_ids']);
+            if (!in_array($property->type_id, $types2keep)) {
+              continue;
+            }
+          }
+          
+          // Add property to the list of items to be rendered
+          $this->items[$property->stock_id][$property->stockprop_id]['stock_id'] = $property->stock_id;
+          $this->items[$property->stock_id][$property->stockprop_id]['stockprop_id'] = $property->stockprop_id;
+          $this->items[$property->stock_id][$property->stockprop_id]['type_id'] = $property->type_id;
+          $this->items[$property->stock_id][$property->stockprop_id]['type_name'] = check_plain($property->type_name);
+          $this->items[$property->stock_id][$property->stockprop_id]['value'] = check_plain($property->value);
+          $this->items[$property->stock_id][$property->stockprop_id]['rank'] = $property->rank;
+        }
+      }
+    }
+  }
 
   function render_item($count, $item) {
-  	$text = array();
-  	
-  	if ($this->options['stockprop_display_options']['value']) {
-  		if ($item['value']) {
+    $text = array();
+    
+    if ($this->options['stockprop_display_options']['value']) {
+      if ($item['value']) {
         $text[] =  $item['value'];
       } else {
         //display checkmark image
-				$image_path = drupal_get_path('module','tripal_core').'/images/checkmark.gif';
+        $image_path = drupal_get_path('module','tripal_core').'/images/checkmark.gif';
         $text[] = '<img border="0" src="'.url($image_path).'" alt="checkmark" />';
       }
-  	} 
-  	if ($this->options['stockprop_display_options']['type']) {
-  		$text[] = $item['type_name'];
-  	}
+    } 
+    if ($this->options['stockprop_display_options']['type']) {
+      $text[] = $item['type_name'];
+    }
   
-		if (sizeof($text) > 1) {
-			return $text[0].' ('.$text[1].')';
-		} else {
-			return $text[0];
-		}
+    if (sizeof($text) > 1) {
+      return $text[0].' ('.$text[1].')';
+    } else {
+      return $text[0];
+    }
   }
 
   function document_self_tokens(&$tokens) {

+ 2 - 0
tripal_core/views/handlers/views_handler_filter_stockprop_id.inc

@@ -86,6 +86,8 @@ class views_handler_filter_stockprop_id extends views_handler_filter {
     parent::value_form(&$form, &$form_state);
 	
 		if ($this->options['expose']['display_type'] == 'select') {
+		
+			// Get options
 			$previous_db = db_set_active('chado');
 			$resource = db_query("SELECT value FROM stockprop WHERE type_id=".$this->type." ORDER BY value");
 			db_set_active($previous_db);

+ 3 - 0
tripal_organism/views/organism.views.inc

@@ -64,6 +64,9 @@ function retrieve_organism_views_data() {
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
+     'argument' => array(
+     	 'handler' => 'views_handler_argument',
+     ),
   );
 
   // Calculated Field: Node ID

+ 67 - 61
tripal_stock/tripal_stock.views.inc

@@ -67,6 +67,9 @@ function tripal_stock_views_handlers() {
      'views_handler_filter_stockprop_id' => array(
      	'parent' => 'views_handler_filter',
      ),
+     'views_handler_argument_stockprop_id' => array(
+     	'parent' => 'views_handler_argument_string',
+     ),
    ),
  );
 }
@@ -92,75 +95,78 @@ function tripal_stock_views_pre_render	(&$view) {
 			$stock_ids[$row_num] = $row->stock_id;
 		}
 		
-		//-----Properties------------------------------------------
-		$field_names = array_keys($view->field);
-		//if any property fields are in the current view
-		$property_field_names = preg_grep('/properties/',$field_names);
-		if (!empty($property_field_names)) {
-			$sql = "SELECT stockprop.*, cvterm.name as type_name FROM stockprop "
-				."INNER JOIN cvterm cvterm ON stockprop.type_id=cvterm.cvterm_id "
-				."WHERE stockprop.stock_id IN (".implode(',',$stock_ids).")";
-			$previous_db = db_set_active('chado');
-			$resource = db_query($sql);
-			db_set_active($previous_db);
+		if (sizeof($stock_ids)) {
+		
+			//-----Properties------------------------------------------
+			$field_names = array_keys($view->field);
+			//if any property fields are in the current view
+			$property_field_names = preg_grep('/properties/',$field_names);
+			if (!empty($property_field_names)) {
+				$sql = "SELECT stockprop.*, cvterm.name as type_name FROM stockprop "
+					."INNER JOIN cvterm cvterm ON stockprop.type_id=cvterm.cvterm_id "
+					."WHERE stockprop.stock_id IN (".implode(',',$stock_ids).")";
+				$previous_db = db_set_active('chado');
+				$resource = db_query($sql);
+				db_set_active($previous_db);
 		
-			$view->result[$key]->properties = array();
-			while ($r = db_fetch_object($resource)) {
-				$key = array_search($r->stock_id, $stock_ids);
-				$view->result[$key]->properties[] = $r;
+				$view->result[$key]->properties = array();
+				while ($r = db_fetch_object($resource)) {
+					$key = array_search($r->stock_id, $stock_ids);
+					$view->result[$key]->properties[] = $r;
+				}
 			}
-		}
 		
-		//-----Relationships----------------------------------------
-		//if any relationship fields are in the current view
-		$relationship_field_names = preg_grep('/relationships/', $field_names);
-		if (!empty($relationship_field_names)) {
-			$sql = "SELECT stock_relationship.*, cvterm.name as type_name, "
-				."subject_stock.name as subject_name, object_stock.name as object_name "
-				."FROM stock_relationship "
-				."LEFT JOIN stock subject_stock ON stock_relationship.subject_id=subject_stock.stock_id "
-				."LEFT JOIN stock object_stock ON stock_relationship.object_id=object_stock.stock_id "
-				."LEFT JOIN cvterm cvterm ON stock_relationship.type_id = cvterm.cvterm_id "
-				."WHERE stock_relationship.subject_id IN (".implode(',',$stock_ids).") "
-				."OR stock_relationship.object_id IN (".implode(',',$stock_ids).") ";
-			$previous_db = db_set_active('chado');
-			$resource = db_query($sql);
-			db_set_active($previous_db);
+			//-----Relationships----------------------------------------
+			//if any relationship fields are in the current view
+			$relationship_field_names = preg_grep('/relationships/', $field_names);
+			if (!empty($relationship_field_names)) {
+				$sql = "SELECT stock_relationship.*, cvterm.name as type_name, "
+					."subject_stock.name as subject_name, object_stock.name as object_name "
+					."FROM stock_relationship "
+					."LEFT JOIN stock subject_stock ON stock_relationship.subject_id=subject_stock.stock_id "
+					."LEFT JOIN stock object_stock ON stock_relationship.object_id=object_stock.stock_id "
+					."LEFT JOIN cvterm cvterm ON stock_relationship.type_id = cvterm.cvterm_id "
+					."WHERE stock_relationship.subject_id IN (".implode(',',$stock_ids).") "
+					."OR stock_relationship.object_id IN (".implode(',',$stock_ids).") ";
+				$previous_db = db_set_active('chado');
+				$resource = db_query($sql);
+				db_set_active($previous_db);
 			
-			while ($r = db_fetch_object($resource)) {
-				if (in_array($r->subject_id, $stock_ids)) {
-					$key = array_search($r->subject_id, $stock_ids);
-					$r->stock_id = $r->subject_id;
-					$view->result[$key]->relationships[] = clone $r;
-				}
-				if (in_array($r->object_id, $stock_ids)) {
-					$key = array_search($r->object_id, $stock_ids);
-					$r->stock_id = $r->object_id;
-					$view->result[$key]->relationships[] = clone $r;
+				while ($r = db_fetch_object($resource)) {
+					if (in_array($r->subject_id, $stock_ids)) {
+						$key = array_search($r->subject_id, $stock_ids);
+						$r->stock_id = $r->subject_id;
+						$view->result[$key]->relationships[] = clone $r;
+					}
+					if (in_array($r->object_id, $stock_ids)) {
+						$key = array_search($r->object_id, $stock_ids);
+						$r->stock_id = $r->object_id;
+						$view->result[$key]->relationships[] = clone $r;
+					}
 				}
 			}
-		}
 		
-		//-----DB References--------------------------------------------
-		//if any dbxref fields are in the current view
-		$dbxref_field_names = preg_grep('/dbxref/',$field_names);
-		if (!empty($dbxref_field_names)) {
-			$sql = "SELECT stock_dbxref.*, dbxref.db_id, db.name as db_name, db.urlprefix, "
-				."dbxref.accession, dbxref.version, dbxref.description "
-				."FROM stock_dbxref "
-				."LEFT JOIN dbxref dbxref ON stock_dbxref.dbxref_id=dbxref.dbxref_id "
-				."LEFT JOIN db db ON dbxref.db_id=db.db_id "
-				."WHERE stock_dbxref.stock_id IN (".implode(',',$stock_ids).")";
-			$previous_db = db_set_active('chado');
-			$resource = db_query($sql);
-			db_set_active($previous_db);
+			//-----DB References--------------------------------------------
+			//if any dbxref fields are in the current view
+			$dbxref_field_names = preg_grep('/dbxref/',$field_names);
+			if (!empty($dbxref_field_names)) {
+				$sql = "SELECT stock_dbxref.*, dbxref.db_id, db.name as db_name, db.urlprefix, "
+					."dbxref.accession, dbxref.version, dbxref.description "
+					."FROM stock_dbxref "
+					."LEFT JOIN dbxref dbxref ON stock_dbxref.dbxref_id=dbxref.dbxref_id "
+					."LEFT JOIN db db ON dbxref.db_id=db.db_id "
+					."WHERE stock_dbxref.stock_id IN (".implode(',',$stock_ids).")";
+				$previous_db = db_set_active('chado');
+				$resource = db_query($sql);
+				db_set_active($previous_db);
 		
-			$view->result[$key]->dbxref = array();
-			while ($r = db_fetch_object($resource)) {
-				$key = array_search($r->stock_id, $stock_ids);
-				$view->result[$key]->dbxref[] = $r;
+				$view->result[$key]->dbxref = array();
+				while ($r = db_fetch_object($resource)) {
+					$key = array_search($r->stock_id, $stock_ids);
+					$view->result[$key]->dbxref[] = $r;
+				}
 			}
-		}
-		
+			
+		} //if there are stocks
 	} //if we're dealing with a stock view
 }

+ 65 - 0
tripal_stock/views/handlers/views_handler_argument_stockprop_id.inc

@@ -0,0 +1,65 @@
+<?php
+
+class views_handler_argument_stockprop_id extends views_handler_argument_string {
+
+	function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);   
+    unset($form['glossary']);
+    unset($form['limit']);
+    unset($form['add_table']);
+    unset($form['require_value']);
+    
+    //get options & display as options
+	  $previous_db = db_set_active('chado');
+    $result = db_query("SELECT cvt.cvterm_id as type_id, cvt.name FROM cvterm cvt WHERE cvt.cvterm_id IN (SELECT type_id FROM stockprop)");
+    db_set_active($previous_db);
+    $types = array();
+    while ($r = db_fetch_object($result)) { $types[$r->type_id] = $r->name; }
+		$form['stockprop_type_id'] = array(
+			'#type' => 'radios',
+			'#title' => t('Property Types'),
+			'#options' => $types,
+			'#default_value' => $this->options['stockprop_type_id'],
+			'#required' => TRUE,
+			'#description' => t('Select the type of property represented by this argument.'),
+		);
+		
+		$operators = array(
+      '=' => t('Is equal to'),
+      '!=' => t('Is not equal to'),
+      '~' => t('Contains'),
+      '!~' => t('Does not contain'),
+      'IS NOT NULL' => t('Is Present (Not Empty)'),
+      'IS NULL' => t('Is Absent (Empty)'),		
+		);
+		$form['operator'] = array(
+			'#type' => 'radios',
+			'#title' => 'Operator',
+			'#description' => t('Specify how to compare the argument with the property values.'),
+			'#options' => $operators,
+			'#default_value' => $this->options['operator'],
+			'#required' => TRUE,
+		);
+  }
+  
+  /**
+   * Build the query based upon the formula
+   */
+	function query() {
+    $argument = $this->argument;
+    if (!empty($this->options['transform_dash'])) {
+      $argument = strtr($argument, '-', ' ');
+    }
+    
+		if (preg_match('/IS NOT NULL/', $this->options['operator'])) {
+			$new_where_sql = "stock_id IN (SELECT stock_id FROM stockprop WHERE type_id=".$this->options['stockprop_type_id'].")";
+		} elseif (preg_match('/IS NULL/', $this->options['operator'])) {
+			$new_where_sql = "stock_id NOT IN (SELECT stock_id FROM stockprop WHERE type_id=".$this->options['stockprop_type_id'].")";
+		} else {
+			$new_where_sql = "stock_id IN (SELECT stock_id FROM stockprop "
+							. "WHERE type_id=".$this->options['stockprop_type_id']." AND value".$this->options['operator']."'".$argument."')";
+		}
+		$this->query->add_where($this->options['group'], $new_where_sql);
+  }
+
+}

+ 5 - 0
tripal_stock/views/stock.views.inc

@@ -164,6 +164,11 @@ function retrieve_stock_views_data() {
     	'help' => t('Filter by a given property type or value.'),
     	'handler' => 'views_handler_filter_stockprop_id',
     ),
+    'argument' => array(
+    	'title' => t('Properties'),
+    	'help' => t('Allow a property to be supplied in the path'),
+    	'handler' => 'views_handler_argument_stockprop_id',
+    ),
   );
 
 	//Calculated Field: stock properties (ALL)