You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Please see following page for additional insights on the model.
29
29
---
30
30
31
31
32
-
##Code contributions
32
+
##Code contributions
33
33
In order to succesfully compile the PnP PowerShell solution you will _also_ have to download *and build in Visual Studio* the [PnP-Sites-Core](https://github.com/OfficeDev/PnP-Sites-Core) repository and make the dev branch available. The PowerShell solution depends on it. In order to succesfully
34
34
compile it, make sure that PnP-Sites-Core is located at the same level as PnP-PowerShell.
The reason for this is that the PnP-PowerShell library will have references to the release and debug builds of the PnP-Sites-Core library.
43
43
44
44
A few notes:
45
-
###Every new cmdlet should provide help and examples
45
+
###Every new cmdlet should provide help and examples
46
46
As documentation is autogenerated by building the solution, make sure that you include both help and examples, alike
47
47
48
48
```csharp
@@ -55,14 +55,14 @@ As documentation is autogenerated by building the solution, make sure that you i
55
55
{
56
56
}
57
57
```
58
-
###Most cmdlets will extend SPOWebCmdlet which provides a few helper objects for you to use, like SelectedWeb and ClientContext
58
+
###Most cmdlets will extend SPOWebCmdlet which provides a few helper objects for you to use, like SelectedWeb and ClientContext
59
59
As most cmdlets are 'web sensitive' (e.g. you can specify a -Web parameter to point to a different subweb), make sure that you use the correct ClientContext. When a user specifies the -Web parameter
60
60
in a cmdlet that extens SPOWebCmdlet, the cmdlet will switch it's internal context to that web, reusing credentials. It is important to use the right context, and the easiest way to do that is to use
61
61
62
62
```csharp
63
63
varcontext=SelectedWeb.Context;
64
64
```
65
-
###Cmdlets will have to work both on-premises and in the cloud
65
+
###Cmdlets will have to work both on-premises and in the cloud
66
66
You can use preprocessor variables ("ONPREMISES" or "SP2013" and "SP2016") to build different cmdlets for the different targets. In cases where it is not possible to provide functionality for either the
67
67
cloud or on-premises, make sure to remove the full cmdlet from the compiled solution by having #IF(!SP2013) or #IF(SP2013) as the _first line of the cmdlet, before using statements.
68
68
@@ -82,11 +82,11 @@ public class MyCmdlet : SPOWebCmdlet
82
82
83
83
If only parts of a cmdlet require different behaviour based upon the different version of the SDK, you are recommended to use the #ONPREMISES or other available preprocessor variable throughout your code to exclude or include certain code.
84
84
85
-
###Cmdlets will have to use common verbs
85
+
###Cmdlets will have to use common verbs
86
86
87
87
The verb of a cmdlet (get-, add-, etc.) should follow acceptable cmdlet standards and should be part of one of the built in verbs classes (VerbsCommon, VerbsData, etc.):
88
88
89
-
##Documentation contributions
89
+
##Documentation contributions
90
90
If you want to contribute to cmdlet documentation, please do not make a pull request to modify the actual files in the Documentation folder itself. Those files
91
91
are automatically generated based upon comments in the actual classes. So if you want to modify documentation and or add an example of a cmdlet, navigate to the
92
92
corresponding class where the cmdlet is being implemented and add the comments there. An example can for instance be found in
Remarks=@"This will prompt you for credentials and creates a context for the other PowerShell commands to use. It assumes your server is configured for Forms Based Authentication (FBA)",
Copy file name to clipboardExpand all lines: Commands/Search/SubmitSearchQuery.cs
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,9 @@ public class SubmitSearchQuery : PnPWebCmdlet
99
99
[Parameter(Mandatory=false,HelpMessage="Determines whether personal favorites data is processed or not.",ParameterSetName=ParameterAttribute.AllParameterSets)]
100
100
publicboolProcessPersonalFavorites;
101
101
102
+
[Parameter(Mandatory=false,HelpMessage="Specifies whether only relevant results are returned",ParameterSetName=ParameterAttribute.AllParameterSets)]
|ContentType|ContentTypePipeBind[]|True|The content type object, name or id to add. Either specify name, an id, or a content type object.|
15
15
|DocumentSet|DocumentSetPipeBind|True|The document set object or id to add the content type to. Either specify a name, a document set template object, an id, or a content type object|
16
16
|Web|WebPipeBind|False|The web to apply the command to. Omit this parameter to use the current web.|
|Sequence|Int|False|Sequence of this CustomAction being injected. Use when you have a specific sequence with which to have multiple CustomActions being added to the page.|
37
37
|Url|String|False|The URL, URI or ECMAScript (JScript, JavaScript) function associated with the action|
38
38
|Web|WebPipeBind|False|The web to apply the command to. Omit this parameter to use the current web.|
39
-
##Examples
39
+
##Examples
40
40
41
-
###Example 1
41
+
###Example 1
42
42
```powershell
43
43
$cUIExtn = "<CommandUIExtension><CommandUIDefinitions><CommandUIDefinition Location=""Ribbon.List.Share.Controls._children""><Button Id=""Ribbon.List.Share.GetItemsCountButton"" Alt=""Get list items count"" Sequence=""11"" Command=""Invoke_GetItemsCountButtonRequest"" LabelText=""Get Items Count"" TemplateAlias=""o1"" Image32by32=""_layouts/15/images/placeholder32x32.png"" Image16by16=""_layouts/15/images/placeholder16x16.png"" /></CommandUIDefinition></CommandUIDefinitions><CommandUIHandlers><CommandUIHandler Command=""Invoke_GetItemsCountButtonRequest"" CommandAction=""javascript: alert('Total items in this list: '+ ctx.TotalListItems);"" EnabledScript=""javascript: function checkEnable() { return (true);} checkEnable();""/></CommandUIHandlers></CommandUIExtension>"
0 commit comments